diff options
author | Campbell Barton <ideasman42@gmail.com> | 2007-06-04 12:15:27 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2007-06-04 12:15:27 +0400 |
commit | f368b60bafcf9643afa7a51447ceca813b656abc (patch) | |
tree | 66fe177d682b312e5a725e4c17c065e2233cc373 /source/blender/python/api2_2x/gen_library.c | |
parent | 531ffedba9cf00dd086a0c36894e56718e540384 (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/gen_library.c')
-rw-r--r-- | source/blender/python/api2_2x/gen_library.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/source/blender/python/api2_2x/gen_library.c b/source/blender/python/api2_2x/gen_library.c index 1e9470f8dcf..315a86ff607 100644 --- a/source/blender/python/api2_2x/gen_library.c +++ b/source/blender/python/api2_2x/gen_library.c @@ -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; } |