aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Gilbert2011-04-20 21:05:03 +1000
committerPaul Gilbert2011-04-20 21:05:42 +1000
commit432771b5d931b5722c28d3158c5d82774c16c632 (patch)
treeb108b6cfc67eea4de349bbddad7ee4914b2a1ed3
parent1f67138b7dfa14388d46ab5f698386e52b838190 (diff)
downloadscummvm-rg350-432771b5d931b5722c28d3158c5d82774c16c632.tar.gz
scummvm-rg350-432771b5d931b5722c28d3158c5d82774c16c632.tar.bz2
scummvm-rg350-432771b5d931b5722c28d3158c5d82774c16c632.zip
TSAGE: Properly destroy cloned objects when removed from a scene
-rw-r--r--engines/tsage/core.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/engines/tsage/core.cpp b/engines/tsage/core.cpp
index ba4c5923bc..d064917c36 100644
--- a/engines/tsage/core.cpp
+++ b/engines/tsage/core.cpp
@@ -2254,8 +2254,9 @@ void SceneObject::removeObject() {
_mover->remove();
_mover = NULL;
}
- if (_flags & 0x800)
- destroy();
+ if (_flags & OBJFLAG_CLONED)
+ // Cloned temporary object, so delete it
+ delete this;
}
GfxSurface SceneObject::getFrame() {