diff options
author | Mitchell Stokes <mogurijin@gmail.com> | 2014-04-30 10:53:10 +0400 |
---|---|---|
committer | Mitchell Stokes <mogurijin@gmail.com> | 2014-04-30 10:53:19 +0400 |
commit | cdc5d6537f09bceccbfaa0273bfc72696960c305 (patch) | |
tree | a87e0a6982823010a4ecf61ff6c1adfad92bf675 /source | |
parent | 3150925ae8f31a184d229f98a5f8d9262833738b (diff) |
BGE: Fixing a memory leak from the recent physics changes.
Diffstat (limited to 'source')
-rw-r--r-- | source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp b/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp index 3c9c5d0a239..966afa0e7f2 100644 --- a/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp +++ b/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp @@ -3200,6 +3200,8 @@ void CcdPhysicsEnvironment::ConvertObject(KX_GameObject *gameobj, RAS_MeshObject { delete motionstate; shapeInfo->Release(); + if (parent) + parent->Release(); return; } @@ -3252,6 +3254,8 @@ void CcdPhysicsEnvironment::ConvertObject(KX_GameObject *gameobj, RAS_MeshObject shapeInfo->Release(); // delete motionstate as it's not used delete motionstate; + if (parent) + parent->Release(); return; } @@ -3428,4 +3432,7 @@ void CcdPhysicsEnvironment::ConvertObject(KX_GameObject *gameobj, RAS_MeshObject } } #endif + + if (parent) + parent->Release(); } |