From 11186184aa7af143e72c539be0ed06c3ef37a146 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Sat, 18 May 2013 10:24:34 +0000 Subject: Fix #35404: crash in file save with python code that accesses mesh from panel. On file save the mesh gets loads from the editmesh but the derived mesh caches wer not cleared. This usually happens through the depsgraph but it needs to be done manually here. Most changes are some refactoring to deduplicate derived mesh freeing code. --- source/blender/editors/sculpt_paint/sculpt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/editors/sculpt_paint') diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c index fce520d04fa..ee10adbf7db 100644 --- a/source/blender/editors/sculpt_paint/sculpt.c +++ b/source/blender/editors/sculpt_paint/sculpt.c @@ -4542,7 +4542,7 @@ void sculpt_pbvh_clear(Object *ob) ss->pbvh = NULL; if (dm) dm->getPBVH(NULL, dm); - BKE_object_free_display(ob); + BKE_object_free_derived_caches(ob); } void sculpt_update_after_dynamic_topology_toggle(bContext *C) -- cgit v1.2.3