aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Gilbert2010-04-20 10:13:27 +0000
committerPaul Gilbert2010-04-20 10:13:27 +0000
commitdead0db8d89cdfb256aeae831a637872aa481c26 (patch)
tree9b4e3aafd21cca853b744807cfc413a7054288be
parent626784f28e8511af2ccb10376fc95d16c4593ce6 (diff)
downloadscummvm-rg350-dead0db8d89cdfb256aeae831a637872aa481c26.tar.gz
scummvm-rg350-dead0db8d89cdfb256aeae831a637872aa481c26.tar.bz2
scummvm-rg350-dead0db8d89cdfb256aeae831a637872aa481c26.zip
Corrected a debug statement that could use an object field after the object was destroyed
svn-id: r48741
-rw-r--r--engines/lure/hotspots.cpp5
1 files 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) {