From 7d827d0e9e1a396580be988313bfd9ee4273a517 Mon Sep 17 00:00:00 2001 From: Pablo Dobarro Date: Tue, 9 Mar 2021 20:41:06 +0100 Subject: Fix T86422: Expand crashing with EEVEE enabled Using EEVEE (as well as some other actions like saving the file or tweaking mesh parameters) can cause a PBVH rebuild. The different sculpt tools can store PBVH nodes or other related data in their caches, so this data becomes invalid if the PBVH rebuilds during evaluation. This ensures that the PBVH does not rebuild while the cache of Expand is being used, like it already happens for brushes and filters. Reviewed By: JacquesLucke Maniphest Tasks: T86422 Differential Revision: https://developer.blender.org/D10675 --- source/blender/blenkernel/intern/paint.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source') diff --git a/source/blender/blenkernel/intern/paint.c b/source/blender/blenkernel/intern/paint.c index 08c5beedbf3..2e81b61ad8c 100644 --- a/source/blender/blenkernel/intern/paint.c +++ b/source/blender/blenkernel/intern/paint.c @@ -1760,7 +1760,7 @@ void BKE_sculpt_update_object_before_eval(Object *ob) SculptSession *ss = ob->sculpt; if (ss && ss->building_vp_handle == false) { - if (!ss->cache && !ss->filter_cache) { + if (!ss->cache && !ss->filter_cache && !ss->expand_cache) { /* We free pbvh on changes, except in the middle of drawing a stroke * since it can't deal with changing PVBH node organization, we hope * topology does not change in the meantime .. weak. */ -- cgit v1.2.3