From 2de340199d31767299337042ed4079d5ed729d9a Mon Sep 17 00:00:00 2001 From: Ken Hughes Date: Fri, 18 Nov 2005 16:03:03 +0000 Subject: [PATCH] -- fixed bug with returning NULL from Object_CreatePyObject() on MacOS/X. The code prior to the last commit worked... but can't see the differene --- source/blender/python/api2_2x/Object.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/source/blender/python/api2_2x/Object.c b/source/blender/python/api2_2x/Object.c index 52c2aaf4519..23dad137f23 100644 --- a/source/blender/python/api2_2x/Object.c +++ b/source/blender/python/api2_2x/Object.c @@ -2590,15 +2590,16 @@ PyObject *Object_CreatePyObject( struct Object * obj ) BPy_Object *blen_object; if( !obj ) - Py_RETURN_NONE; + return EXPP_incr_ret( Py_None ); blen_object = ( BPy_Object * ) PyObject_NEW( BPy_Object, &Object_Type ); - if( blen_object ) { - blen_object->object = obj; - obj->id.us++; + if( blen_object == NULL ) { + return ( NULL ); } + blen_object->object = obj; + obj->id.us++; return ( ( PyObject * ) blen_object ); }