2.5: fix for crash in EM_EndEditMesh when using 3d view header.
authorBrecht Van Lommel <brechtvanlommel@pandora.be>
Mon, 30 Mar 2009 13:53:48 +0000 (13:53 +0000)
committerBrecht Van Lommel <brechtvanlommel@pandora.be>
Mon, 30 Mar 2009 13:53:48 +0000 (13:53 +0000)
source/blender/editors/space_view3d/view3d_header.c

index 28db2f450949961c61d786e39be9c0e03a23783a..bfe1ba49bbb8512e677d0a451807fe570a8e88a4 100644 (file)
@@ -5118,7 +5118,8 @@ static void do_view3d_header_buttons(bContext *C, void *arg, int event)
                break;
        }
 
-       EM_EndEditMesh(obedit->data, em);
+       if(obedit && obedit->type==OB_MESH)
+               EM_EndEditMesh(obedit->data, em);
 }
 
 static void view3d_header_pulldowns(const bContext *C, uiBlock *block, Object *ob, int *xcoord, int yco)