Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMitchell Stokes <mogurijin@gmail.com>2014-04-30 10:53:10 +0400
committerMitchell Stokes <mogurijin@gmail.com>2014-04-30 10:53:19 +0400
commitcdc5d6537f09bceccbfaa0273bfc72696960c305 (patch)
treea87e0a6982823010a4ecf61ff6c1adfad92bf675 /source/gameengine
parent3150925ae8f31a184d229f98a5f8d9262833738b (diff)
BGE: Fixing a memory leak from the recent physics changes.
Diffstat (limited to 'source/gameengine')
-rw-r--r--source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp7
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();
}