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:
authorCampbell Barton <ideasman42@gmail.com>2007-06-04 12:15:27 +0400
committerCampbell Barton <ideasman42@gmail.com>2007-06-04 12:15:27 +0400
commitf368b60bafcf9643afa7a51447ceca813b656abc (patch)
tree66fe177d682b312e5a725e4c17c065e2233cc373 /source/blender/python/api2_2x/Draw.c
parent531ffedba9cf00dd086a0c36894e56718e540384 (diff)
OBJ smooting groups exported enabled for by default for the first smooth group (should have been disabled)
gen_library.c - Own error, hashing did not decref the tuple it created. Draw.c - callback also missed a decref
Diffstat (limited to 'source/blender/python/api2_2x/Draw.c')
-rw-r--r--source/blender/python/api2_2x/Draw.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/python/api2_2x/Draw.c b/source/blender/python/api2_2x/Draw.c
index ede780294ef..d0d2810bfae 100644
--- a/source/blender/python/api2_2x/Draw.c
+++ b/source/blender/python/api2_2x/Draw.c
@@ -740,7 +740,7 @@ static void exec_but_callback(void *pyobj, void *data)
PyObject *result;
PyObject * pyvalue;
uiBut *but = (uiBut *)data;
- PyObject *arg = PyTuple_New( 2 );
+ PyObject *arg;
PyObject *callback = (PyObject *)pyobj;
double value = ui_get_but_val(but);
@@ -795,6 +795,7 @@ static void exec_but_callback(void *pyobj, void *data)
printf("Error, no button type matched.");
}
+ arg = PyTuple_New( 2 );
if (uiblock==NULL)
PyTuple_SetItem( arg, 0, PyInt_FromLong(but->retval - EXPP_BUTTON_EVENTS_OFFSET) );
else
@@ -803,6 +804,8 @@ static void exec_but_callback(void *pyobj, void *data)
PyTuple_SetItem( arg, 1, pyvalue );
result = PyObject_CallObject( callback, arg );
+ Py_DECREF(arg);
+
if (!result) {
Py_DECREF(pyvalue);
PyErr_Print( );