diff options
-rw-r--r-- | engines/fullpipe/messages.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/engines/fullpipe/messages.cpp b/engines/fullpipe/messages.cpp index 818753ab22..0fa2f6d8a0 100644 --- a/engines/fullpipe/messages.cpp +++ b/engines/fullpipe/messages.cpp @@ -644,6 +644,9 @@ bool addMessageHandlerByIndex(int (*callback)(ExCommand *), int index, int16 id) if (curItem) curItem = curItem->nextItem; + if (!curItem) + return false; + bool res = allocMessageHandler(curItem, id, callback, index); if (res) |