bugfix [#19719] segfault assigning a different mesh to object in edit mode
authorCampbell Barton <ideasman42@gmail.com>
Sat, 24 Oct 2009 22:41:40 +0000 (22:41 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Sat, 24 Oct 2009 22:41:40 +0000 (22:41 +0000)
source/blender/makesrna/intern/rna_object.c

index 13ecfd911145608489054026b40128b31a7e8315..28e4e7fc443b5499025673bfebab52bca983a295 100644 (file)
@@ -183,7 +183,7 @@ static void rna_Object_data_set(PointerRNA *ptr, PointerRNA value)
        Object *ob= (Object*)ptr->data;
        ID *id= value.data;
 
-       if(ob->type == OB_EMPTY || id == NULL)
+       if(ob->type == OB_EMPTY || id == NULL || ob->mode & OB_MODE_EDIT)
                return;
        
        if(ob->type == OB_MESH) {