From a9ced688bc02a69ddcbfb8fce8ab3b9c5983d06a Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Sun, 16 Dec 2007 03:47:24 +0000 Subject: Bugfix for followers doing an Ask action in another room svn-id: r29869 --- engines/lure/hotspots.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'engines') 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()); } } -- cgit v1.2.3