Assert: add check to last commit
authorCampbell Barton <ideasman42@gmail.com>
Tue, 8 Jan 2019 23:32:02 +0000 (10:32 +1100)
committerCampbell Barton <ideasman42@gmail.com>
Tue, 8 Jan 2019 23:33:36 +0000 (10:33 +1100)
source/blender/blenkernel/intern/object.c

index 62f5b018545b30e9959d671366976392863d33f2..ce4d60f6191f394f121423db10cc6b85d0419689 100644 (file)
@@ -2961,7 +2961,7 @@ void BKE_object_handle_update(Depsgraph *depsgraph, Scene *scene, Object *ob)
 
 void BKE_object_sculpt_data_create(Object *ob)
 {
-       BLI_assert(ob->mode & OB_MODE_ALL_SCULPT);
+       BLI_assert((ob->sculpt == NULL) && (ob->mode & OB_MODE_ALL_SCULPT));
        ob->sculpt = MEM_callocN(sizeof(SculptSession), __func__);
        ob->sculpt->mode_type = ob->mode;
 }