From 44314581dc934dc99c9504edf671118a9f988b68 Mon Sep 17 00:00:00 2001 From: Benoit Bolsee Date: Sat, 1 Mar 2008 19:29:01 +0000 Subject: Mem leak fixed in sound buffer & parent invert node --- source/gameengine/SceneGraph/SG_IObject.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'source/gameengine/SceneGraph') diff --git a/source/gameengine/SceneGraph/SG_IObject.cpp b/source/gameengine/SceneGraph/SG_IObject.cpp index 232ceb06958..4787847da0d 100644 --- a/source/gameengine/SceneGraph/SG_IObject.cpp +++ b/source/gameengine/SceneGraph/SG_IObject.cpp @@ -128,6 +128,11 @@ ActivateDestructionCallback( // Call client provided destruction function on this! m_callbacks.m_destructionfunc(this,m_SGclientObject,m_SGclientInfo); } + else + { + // no callback but must still destroy the node to avoid memory leak + delete this; + } } void -- cgit v1.2.3