diff options
author | Ken Hughes <khughes@pacific.edu> | 2007-05-26 00:54:48 +0400 |
---|---|---|
committer | Ken Hughes <khughes@pacific.edu> | 2007-05-26 00:54:48 +0400 |
commit | ea9b3dc387f5a167cf6b9e53f7be63e9b76de241 (patch) | |
tree | cab3712419627cb2ca34527de157ce52acf1fbe0 /source/blender | |
parent | 769615aed29aef6e444b94249f105ed4335b66ad (diff) |
Fix segfault in PyBonesDict_FromPyArmature() caused by uninitialized memory.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/python/api2_2x/Armature.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/python/api2_2x/Armature.c b/source/blender/python/api2_2x/Armature.c index a4c9221639f..c82597f9b00 100644 --- a/source/blender/python/api2_2x/Armature.c +++ b/source/blender/python/api2_2x/Armature.c @@ -428,6 +428,9 @@ static PyObject *PyBonesDict_FromPyArmature(BPy_Armature *py_armature) if (!py_BonesDict) goto RuntimeError; + py_BonesDict->bones = NULL; + py_BonesDict->editbones.first = py_BonesDict->editbones.last = NULL; + //create internal dictionaries py_BonesDict->bonesMap = PyDict_New(); py_BonesDict->editbonesMap = PyDict_New(); @@ -1294,7 +1297,7 @@ PyObject *Armature_RebuildBones(PyObject *pyarmature) * Converts a bArmature to a PyArmature * * WARNING!!! - MEMORY LEAK HERE, Run in a loop and loose your ram. - * cannot find out why but dosnt seam to be the weakref */ + * cannot find out why but doesn't seem to be the weakref */ PyObject *Armature_CreatePyObject(struct bArmature *armature) { |