diff options
-rw-r--r-- | engines/agos/items.cpp | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/engines/agos/items.cpp b/engines/agos/items.cpp index 3b0ac1d205..fed323e70e 100644 --- a/engines/agos/items.cpp +++ b/engines/agos/items.cpp @@ -382,13 +382,8 @@ int AGOSEngine::wordMatch(Item *item, int16 a, int16 n) { } Item *AGOSEngine::derefItem(uint item) { - // Occurs when loading item store from restart state in - // Elvira 2 (Amiga/AtariST) and Waxworks (Amiga). - if (item >= _itemArraySize) { - debug(0, "derefItem: invalid item %d", item); - return NULL; - } - + if (item >= _itemArraySize) + error("derefItem: invalid item %d", item); return _itemArrayPtr[item]; } |