Bugfix #19696: Crash when adding an Empty or Force field
authorJoshua Leung <aligorith@gmail.com>
Tue, 20 Oct 2009 23:18:00 +0000 (23:18 +0000)
committerJoshua Leung <aligorith@gmail.com>
Tue, 20 Oct 2009 23:18:00 +0000 (23:18 +0000)
source/blender/blenkernel/intern/paint.c

index 9a8f6d284f344485fa8010afc1e8d3f89e8ea630..3dfe3966e2fe1ef2ac0c3f3068e3888cebd5f3da 100644 (file)
@@ -161,7 +161,7 @@ void paint_brush_slot_remove(Paint *p)
 
 int paint_facesel_test(Object *ob)
 {
-       return (ob && (((Mesh *)ob->data)->editflag & ME_EDIT_PAINT_MASK) && (ob->mode & (OB_MODE_VERTEX_PAINT|OB_MODE_WEIGHT_PAINT|OB_MODE_TEXTURE_PAINT)));
+       return (ob && ob->data && (((Mesh *)ob->data)->editflag & ME_EDIT_PAINT_MASK) && (ob->mode & (OB_MODE_VERTEX_PAINT|OB_MODE_WEIGHT_PAINT|OB_MODE_TEXTURE_PAINT)));
 }
 
 void paint_init(Paint *p, const char col[3])