diff options
author | Campbell Barton <ideasman42@gmail.com> | 2007-05-25 20:43:25 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2007-05-25 20:43:25 +0400 |
commit | f231bd0d5715ac67767f96f3a8d20ebf618f7b03 (patch) | |
tree | 34c05572641b2eafad9fa8e342724e0b05b6b3d8 /source/blender/python/api2_2x/Draw.c | |
parent | a21f8292d9aeff54153fc65560d56b3d4f33575a (diff) |
Many long standing memory leaks fixed in the BPY api.
Data from Armature.c and logic.c still leaks.
Mostly todo with PyList_Append adding a refcount and the bpython api not decrefing.
Also added some features needed to fix a bug in mesh_clean.py (ob.pinShape and ob.activeShape)
Diffstat (limited to 'source/blender/python/api2_2x/Draw.c')
-rw-r--r-- | source/blender/python/api2_2x/Draw.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/python/api2_2x/Draw.c b/source/blender/python/api2_2x/Draw.c index 331415dc849..ede780294ef 100644 --- a/source/blender/python/api2_2x/Draw.c +++ b/source/blender/python/api2_2x/Draw.c @@ -787,9 +787,11 @@ static void exec_but_callback(void *pyobj, void *data) } case BUT: pyvalue = Py_None; + Py_INCREF(pyvalue); break; default: pyvalue = Py_None; + Py_INCREF(pyvalue); printf("Error, no button type matched."); } @@ -802,6 +804,7 @@ static void exec_but_callback(void *pyobj, void *data) result = PyObject_CallObject( callback, arg ); if (!result) { + Py_DECREF(pyvalue); PyErr_Print( ); error( "Python script error: check console" ); } |