Fix T68710: crash on applying modifier after removing all shape keys
authorPhilipp Oeser <info@graphics-engineer.com>
Fri, 16 Aug 2019 10:52:40 +0000 (12:52 +0200)
committerPhilipp Oeser <info@graphics-engineer.com>
Fri, 16 Aug 2019 11:58:47 +0000 (13:58 +0200)
This was a mistake in rB87629b2a7443

`BKE_object_shapekey_free` would never return `true`, so DEG updates
would not happen...
So `ob->shapenr` was not up-to-date etc., leading to crash in
`BKE_mesh_nomain_to_mesh` shapekey handling...

Reviewers: brecht

Maniphest Tasks: T68710

Differential Revision: https://developer.blender.org/D5501

source/blender/blenkernel/intern/object.c

index d95c02cdf7fc30352c996f76033e864625d7e340..ae091f32fbf0ca2c511be15c5658b0c8c02878ef 100644 (file)
@@ -3587,7 +3587,7 @@ bool BKE_object_shapekey_free(Main *bmain, Object *ob)
 
   BKE_id_free_us(bmain, key);
 
-  return false;
+  return true;
 }
 
 bool BKE_object_shapekey_remove(Main *bmain, Object *ob, KeyBlock *kb)