diff options
Diffstat (limited to 'source/blender/python/api2_2x/Font.c')
-rw-r--r-- | source/blender/python/api2_2x/Font.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/python/api2_2x/Font.c b/source/blender/python/api2_2x/Font.c index f7e7b2a2c40..08af60fd9e0 100644 --- a/source/blender/python/api2_2x/Font.c +++ b/source/blender/python/api2_2x/Font.c @@ -136,11 +136,12 @@ static PyObject *M_Font_Get( PyObject * self, PyObject * args ) while( vfont_iter ) { pyobj = Font_CreatePyObject( vfont_iter ); - if( !pyobj ) + if( !pyobj ) { + Py_DECREF(vfontlist); return ( EXPP_ReturnPyObjError ( PyExc_MemoryError, "couldn't create Object" ) ); - + } PyList_SET_ITEM( vfontlist, index, pyobj ); vfont_iter = vfont_iter->id.next; |