diff options
Diffstat (limited to 'source/gameengine')
-rw-r--r-- | source/gameengine/SceneGraph/SG_IObject.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
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 |