Fix crash when doing Sculpt->Edit->Sculpt switch.

We actually get fully rid of BKE_object_free_derived_mesh_caches usages,
now always using BKE_object_free_derived_caches (bad name, btw, should
be 'evaluated_caches ;) )...
This commit is contained in:
Bastien Montagne 2018-06-11 18:56:01 +02:00
parent 3df809958b
commit 4ffd153dbf
1 changed files with 2 additions and 2 deletions

View File

@ -5666,7 +5666,7 @@ void ED_object_sculptmode_enter_ex(
/* Make sure derived final from original object does not reference possibly
* freed memory.
*/
BKE_object_free_derived_mesh_caches(ob);
BKE_object_free_derived_caches(ob);
sculpt_init_session(depsgraph, scene, ob);
@ -5796,7 +5796,7 @@ void ED_object_sculptmode_exit_ex(
paint_cursor_delete_textures();
/* Never leave derived meshes behind. */
BKE_object_free_derived_mesh_caches(ob);
BKE_object_free_derived_caches(ob);
/* Flush object mode. */
DEG_id_tag_update(&ob->id, DEG_TAG_COPY_ON_WRITE);