[Bf-python] patch for Object.c - Object_link()

Stephen Swaney sswaney at swbell.net
Wed Aug 27 00:04:42 CEST 2003


An HTML attachment was scrubbed...
URL: <http://lists.blender.org/pipermail/bf-python/attachments/20030826/566a8352/attachment.html>
-------------- next part --------------
Index: Object.c
===================================================================
RCS file: /cvsroot/bf-blender/blender/source/blender/python/api2_2x/Object.c,v
retrieving revision 1.36
diff -u -r1.36 Object.c
--- Object.c	10 Aug 2003 10:03:37 -0000	1.36
+++ Object.c	26 Aug 2003 19:30:55 -0000
@@ -803,6 +803,13 @@
     if (NMesh_CheckPyObject (py_data))
         data = (void *)NMesh_FromPyObject (py_data);
 
+    /* have we set data to something good? */
+    if( !data )
+    {
+        return (PythonReturnErrorObject (PyExc_AttributeError,
+            "link argument type is not supported "));
+    }
+
     oldid = (ID*) self->object->data;
     id = (ID*) data;
     obj_id = MAKE_ID2 (id->name[0], id->name[1]);


More information about the Bf-python mailing list