diff options
author | Paul Gilbert | 2007-12-16 03:47:24 +0000 |
---|---|---|
committer | Paul Gilbert | 2007-12-16 03:47:24 +0000 |
commit | a9ced688bc02a69ddcbfb8fce8ab3b9c5983d06a (patch) | |
tree | 1f5712b18199d3ff3961d918a76cbdf589e25dcd /engines | |
parent | 3071db8f84e7d452d96b529883bc80595b167609 (diff) | |
download | scummvm-rg350-a9ced688bc02a69ddcbfb8fce8ab3b9c5983d06a.tar.gz scummvm-rg350-a9ced688bc02a69ddcbfb8fce8ab3b9c5983d06a.tar.bz2 scummvm-rg350-a9ced688bc02a69ddcbfb8fce8ab3b9c5983d06a.zip |
Bugfix for followers doing an Ask action in another room
svn-id: r29869
Diffstat (limited to 'engines')
-rw-r--r-- | engines/lure/hotspots.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/engines/lure/hotspots.cpp b/engines/lure/hotspots.cpp index 2162500ad5..f317834a4a 100644 --- a/engines/lure/hotspots.cpp +++ b/engines/lure/hotspots.cpp @@ -1688,7 +1688,6 @@ void Hotspot::doAsk(HotspotData *hotspot) { Resources &res = Resources::getReference(); uint16 usedId = _currentActions.top().supportData().param(1); Hotspot *destCharacter = res.getActiveHotspot(hotspot->hotspotId); - assert(destCharacter); HotspotData *usedHotspot = res.getHotspot(usedId); _data->useHotspotId = usedId; @@ -1707,15 +1706,17 @@ void Hotspot::doAsk(HotspotData *hotspot) { uint16 sequenceOffset = res.getHotspotAction(hotspot->actionsOffset, ASK); if (sequenceOffset >= 0x8000) { - destCharacter->showMessage(sequenceOffset, hotspotId()); + if (destCharacter != NULL) + destCharacter->showMessage(sequenceOffset, hotspotId()); } else if (sequenceOffset != 0) { sequenceOffset = Script::execute(sequenceOffset); if (sequenceOffset == 0) { // Give item to character usedHotspot->roomNumber = hotspotId(); - destCharacter->showMessage(32, hotspotId()); - } else if (sequenceOffset != 1) { + if (destCharacter != NULL) + destCharacter->showMessage(32, hotspotId()); + } else if ((sequenceOffset != 1) && (destCharacter != NULL)) { destCharacter->showMessage(sequenceOffset, hotspotId()); } } |