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:
authorKen Hughes <khughes@pacific.edu>2007-05-26 00:54:48 +0400
committerKen Hughes <khughes@pacific.edu>2007-05-26 00:54:48 +0400
commitea9b3dc387f5a167cf6b9e53f7be63e9b76de241 (patch)
treecab3712419627cb2ca34527de157ce52acf1fbe0 /source/blender/python/api2_2x/Armature.c
parent769615aed29aef6e444b94249f105ed4335b66ad (diff)
Fix segfault in PyBonesDict_FromPyArmature() caused by uninitialized memory.
Diffstat (limited to 'source/blender/python/api2_2x/Armature.c')
-rw-r--r--source/blender/python/api2_2x/Armature.c5
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)
{