[Bf-blender-cvs] [ae581f9445a] master: Fix T85976: Outliner crash deleting collection with multiple windows

Campbell Barton noreply at git.blender.org
Thu Feb 25 14:23:31 CET 2021


Commit: ae581f9445a2bb9980a5aeb205d591b642562fa4
Author: Campbell Barton
Date:   Fri Feb 26 00:09:39 2021 +1100
Branches: master
https://developer.blender.org/rBae581f9445a2bb9980a5aeb205d591b642562fa4

Fix T85976: Outliner crash deleting collection with multiple windows

===================================================================

M	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);
+      }
     }
   }
 }



More information about the Bf-blender-cvs mailing list