diff options
author | Travis Howell | 2010-09-26 12:22:46 +0000 |
---|---|---|
committer | Travis Howell | 2010-09-26 12:22:46 +0000 |
commit | 184833924b851b8da29101b868269b785d17cd17 (patch) | |
tree | f819bb230f5b98c02676fb0d47b93e2b0dd3bcc6 | |
parent | 113e14224dce3fca92dc6a7592dd57e28dfcd24a (diff) | |
download | scummvm-rg350-184833924b851b8da29101b868269b785d17cd17.tar.gz scummvm-rg350-184833924b851b8da29101b868269b785d17cd17.tar.bz2 scummvm-rg350-184833924b851b8da29101b868269b785d17cd17.zip |
AGOS: Fix bug #3011638 - WAXWORKS: Crash retrieving spear from the crocodile carcass.
svn-id: r52906
-rw-r--r-- | engines/agos/items.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/engines/agos/items.cpp b/engines/agos/items.cpp index 874bf1a802..6c6b127a51 100644 --- a/engines/agos/items.cpp +++ b/engines/agos/items.cpp @@ -429,6 +429,9 @@ Item *AGOSEngine::findMaster(int16 a, int16 n) { for (j = 1; j < _itemArraySize; j++) { Item *item = derefItem(j); + if (item == NULL) + continue; + if (wordMatch(item, a, n)) return item; } @@ -442,6 +445,9 @@ Item *AGOSEngine::nextMaster(Item *i, int16 a, int16 n) { for (j = first; j < _itemArraySize; j++) { Item *item = derefItem(j); + if (item == NULL) + continue; + if (wordMatch(item, a, n)) return item; } |