summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/util.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/util.cc b/src/util.cc
index 8bdd532d..f5b3e09c 100644
--- a/src/util.cc
+++ b/src/util.cc
@@ -1869,7 +1869,10 @@ void cmsg_print(byte color, cptr msg)
/* if (character_generated) message_add(t); */
/* Window stuff */
- p_ptr->window |= (PW_MESSAGE);
+ if (p_ptr)
+ {
+ p_ptr->window |= (PW_MESSAGE);
+ }
/* Remember the message */
msg_flag = TRUE;