From 432771b5d931b5722c28d3158c5d82774c16c632 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Wed, 20 Apr 2011 21:05:03 +1000 Subject: TSAGE: Properly destroy cloned objects when removed from a scene --- engines/tsage/core.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'engines') 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() { -- cgit v1.2.3