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:
Campbell Barton
2007-06-04 08:15:27 +00:00
parent 531ffedba9
commit f368b60baf
3 changed files with 68 additions and 70 deletions

View File

@@ -330,9 +330,12 @@ long GenericLib_hash(PyObject * pydata)
{
ID *id = ((BPy_GenericLib *)pydata)->id;
PyObject *pyhash = PyTuple_New( 2 );
long hash;
PyTuple_SetItem( pyhash, 0, PyString_FromString(id->name) );
if (id->lib) PyTuple_SetItem( pyhash, 0, PyString_FromString(id->lib->name) );
else PyTuple_SetItem( pyhash, 1, Py_None );
return PyObject_Hash(pyhash);
if (id->lib) PyTuple_SetItem( pyhash, 1, PyString_FromString(id->lib->name) );
else PyTuple_SetItem( pyhash, 1, EXPP_incr_ret(Py_None) );
hash = PyObject_Hash(pyhash);
Py_DECREF(pyhash);
return hash;
}