diff options
author | Eugene Sandulenko | 2016-05-14 11:31:51 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2016-05-14 11:31:51 +0200 |
commit | 4435902f1e1d9265add6f23966f42b6cce753cd0 (patch) | |
tree | 348f1d56c76ec82c2e9d82cb703b44903c4bc5d4 /engines/pegasus/neighborhood | |
parent | cc11941203f5058bea73bf709478854746d7ea60 (diff) | |
download | scummvm-rg350-4435902f1e1d9265add6f23966f42b6cce753cd0.tar.gz scummvm-rg350-4435902f1e1d9265add6f23966f42b6cce753cd0.tar.bz2 scummvm-rg350-4435902f1e1d9265add6f23966f42b6cce753cd0.zip |
PEGASUS: Add safety check.
The code which follows in the method has this check, assuming that
a null dereference is potentially possible.
Diffstat (limited to 'engines/pegasus/neighborhood')
-rw-r--r-- | engines/pegasus/neighborhood/mars/mars.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/engines/pegasus/neighborhood/mars/mars.cpp b/engines/pegasus/neighborhood/mars/mars.cpp index df5a75541c..7c4a8a98ba 100644 --- a/engines/pegasus/neighborhood/mars/mars.cpp +++ b/engines/pegasus/neighborhood/mars/mars.cpp @@ -1950,7 +1950,7 @@ void Mars::pickedUpItem(Item *item) { } void Mars::dropItemIntoRoom(Item *item, Hotspot *dropSpot) { - if (dropSpot->getObjectID() == kAttackRobotHotSpotID) { + if (dropSpot && dropSpot->getObjectID() == kAttackRobotHotSpotID) { _attackingItem = (InventoryItem *)item; startExtraSequence(kMars48RobotDefends, kExtraCompletedFlag, kFilterNoInput); loadLoopSound2(""); |