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:
authorThomas Szepe <HG1_public@gmx.net>2015-08-16 12:38:25 +0300
committerThomas Szepe <HG1_public@gmx.net>2015-08-16 12:38:25 +0300
commit9437acb7f337e00a422c24497e01973b5613aee5 (patch)
tree14c33ca3f0031e1352aa1e6ab73d5200a7811fff /source/gameengine/Ketsji
parent19cc75d642422f68af1f1aa87790914cad4e20b7 (diff)
BGE: Fix memory leak and crash with certain physic types
Fixing crash if the physic type is set sensor or character. Caused by a790e172d0281e64. Fixing memory leak, if the constraint is deleted with Python API removeConstraint(). Add RemoveConstraint() method to avoid code duplication. Rename old RemoveConstraint() to RemoveConstraintById() which is more suitable name for this method.
Diffstat (limited to 'source/gameengine/Ketsji')
-rw-r--r--source/gameengine/Ketsji/KX_PyConstraintBinding.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/gameengine/Ketsji/KX_PyConstraintBinding.cpp b/source/gameengine/Ketsji/KX_PyConstraintBinding.cpp
index 5877df5f289..a0084662490 100644
--- a/source/gameengine/Ketsji/KX_PyConstraintBinding.cpp
+++ b/source/gameengine/Ketsji/KX_PyConstraintBinding.cpp
@@ -583,7 +583,7 @@ static PyObject *gPyRemoveConstraint(PyObject *self,
{
if (PHY_GetActiveEnvironment())
{
- PHY_GetActiveEnvironment()->RemoveConstraint(constraintid);
+ PHY_GetActiveEnvironment()->RemoveConstraintById(constraintid);
}
}
else {