-- 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
This commit is contained in:
Ken Hughes 2005-11-18 16:03:03 +00:00
parent 621146238c
commit 2de340199d

@ -2590,15 +2590,16 @@ PyObject *Object_CreatePyObject( struct Object * obj )
BPy_Object *blen_object; BPy_Object *blen_object;
if( !obj ) if( !obj )
Py_RETURN_NONE; return EXPP_incr_ret( Py_None );
blen_object = blen_object =
( BPy_Object * ) PyObject_NEW( BPy_Object, &Object_Type ); ( BPy_Object * ) PyObject_NEW( BPy_Object, &Object_Type );
if( blen_object ) { if( blen_object == NULL ) {
blen_object->object = obj; return ( NULL );
obj->id.us++;
} }
blen_object->object = obj;
obj->id.us++;
return ( ( PyObject * ) blen_object ); return ( ( PyObject * ) blen_object );
} }