From dead0db8d89cdfb256aeae831a637872aa481c26 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Tue, 20 Apr 2010 10:13:27 +0000 Subject: Corrected a debug statement that could use an object field after the object was destroyed svn-id: r48741 --- engines/lure/hotspots.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/engines/lure/hotspots.cpp b/engines/lure/hotspots.cpp index d34b9dfc16..cdbf0fb603 100644 --- a/engines/lure/hotspots.cpp +++ b/engines/lure/hotspots.cpp @@ -1251,8 +1251,9 @@ void Hotspot::doAction() { void Hotspot::doAction(Action action, HotspotData *hotspot) { StringList &stringList = Resources::getReference().stringList(); + int hotspotId = _hotspotId; debugC(ERROR_INTERMEDIATE, kLureDebugHotspots, "Action charId=%xh Action=%d/%s", - _hotspotId, (int)action, (action > EXAMINE) ? NULL : stringList.getString((int)action)); + hotspotId, (int)action, (action > EXAMINE) ? NULL : stringList.getString((int)action)); // Set the ACTIVE_HOTSPOT_ID and USE_HOTSPOT_ID fields if (hotspot != NULL) { @@ -1374,7 +1375,7 @@ void Hotspot::doAction(Action action, HotspotData *hotspot) { } debugC(ERROR_DETAILED, kLureDebugHotspots, "Action charId=%xh Action=%d/%s Complete", - _hotspotId, (int)action, (action > EXAMINE) ? NULL : stringList.getString((int)action)); + hotspotId, (int)action, (action > EXAMINE) ? NULL : stringList.getString((int)action)); } void Hotspot::doNothing(HotspotData *hotspot) { -- cgit v1.2.3