Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/python/api2_2x/Mesh.c')
-rw-r--r--source/blender/python/api2_2x/Mesh.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/python/api2_2x/Mesh.c b/source/blender/python/api2_2x/Mesh.c
index 299c999e643..5732fe0d674 100644
--- a/source/blender/python/api2_2x/Mesh.c
+++ b/source/blender/python/api2_2x/Mesh.c
@@ -7909,7 +7909,9 @@ Mesh *Mesh_FromPyObject( PyObject * pyobj, Object *obj )
BPy_Mesh *blen_obj;
blen_obj = ( BPy_Mesh * ) pyobj;
- blen_obj->object = obj;
+ if (obj)
+ blen_obj->object = obj;
+
return blen_obj->mesh;
}