From ae581f9445a2bb9980a5aeb205d591b642562fa4 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 26 Feb 2021 00:09:39 +1100 Subject: Fix T85976: Outliner crash deleting collection with multiple windows --- source/blender/editors/space_outliner/space_outliner.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'source/blender/editors/space_outliner/space_outliner.c') diff --git a/source/blender/editors/space_outliner/space_outliner.c b/source/blender/editors/space_outliner/space_outliner.c index 5fde6e381e0..419713035b6 100644 --- a/source/blender/editors/space_outliner/space_outliner.c +++ b/source/blender/editors/space_outliner/space_outliner.c @@ -395,7 +395,7 @@ static SpaceLink *outliner_duplicate(SpaceLink *sl) return (SpaceLink *)space_outliner_new; } -static void outliner_id_remap(ScrArea *UNUSED(area), SpaceLink *slink, ID *old_id, ID *new_id) +static void outliner_id_remap(ScrArea *area, SpaceLink *slink, ID *old_id, ID *new_id) { SpaceOutliner *space_outliner = (SpaceOutliner *)slink; @@ -427,6 +427,13 @@ static void outliner_id_remap(ScrArea *UNUSED(area), SpaceLink *slink, ID *old_i /* rebuild hash table, because it depends on ids too */ /* postpone a full rebuild because this can be called many times on-free */ space_outliner->storeflag |= SO_TREESTORE_REBUILD; + + if (new_id == NULL) { + /* Redraw is needed when removing data for multiple outlines show the same data. + * without this, the stale data won't get fully flushed when this outliner + * is not the active outliner the user is interacting with. See T85976. */ + ED_area_tag_redraw(area); + } } } } -- cgit v1.2.3