-- 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;
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 );
}