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
This commit is contained in:
@@ -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( );
|
||||
|
||||
Reference in New Issue
Block a user