bugfix [#19719] segfault assigning a different mesh to object in edit mode

This commit is contained in:
Campbell Barton 2009-10-24 22:41:40 +00:00
parent f34cdb4e0b
commit bf5f63f09b

@ -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) {