aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--string.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/string.cpp b/string.cpp
index 4513ff12ca..0877fb6895 100644
--- a/string.cpp
+++ b/string.cpp
@@ -623,8 +623,10 @@ byte *Scumm::addMessageToStack(byte *msg)
if (ptr == NULL)
error("Message stack not allocated");
- if (msg == NULL)
- error("Bad message in addMessageToStack");
+ if (msg == NULL) {
+ warning("Bad message in addMessageToStack, ignoring");
+ return NULL;
+ }
while ((chr = *msg++) != 0) {
if (num > 500)