From 3f20105622a9871e6b71e8a29b25e24a97202e38 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Tue, 15 May 2018 12:49:38 +0200 Subject: Fix random crashes in the outliner, especially with bigger scenes. The outliner can redraw quicker without rebuilding the tree, for example when just moving the mouse and highlighting different items. The way this worked is that the outliner would be tagged to avoid rebuilding, however if another operation that does require rebuilding happens in the meantime we could go out of sync and crash. --- source/blender/editors/space_outliner/outliner_tools.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'source/blender/editors/space_outliner/outliner_tools.c') diff --git a/source/blender/editors/space_outliner/outliner_tools.c b/source/blender/editors/space_outliner/outliner_tools.c index fff1bafdfff..fd5f29aec39 100644 --- a/source/blender/editors/space_outliner/outliner_tools.c +++ b/source/blender/editors/space_outliner/outliner_tools.c @@ -2034,9 +2034,10 @@ static int do_outliner_operation_event(bContext *C, ARegion *ar, SpaceOops *soop outliner_set_flag(&soops->tree, TSE_SELECTED, 0); tselem->flag |= TSE_SELECTED; - /* redraw, same as outliner_select function */ - soops->storeflag |= SO_TREESTORE_REDRAW; - ED_region_tag_redraw(ar); + + /* Only redraw, don't rebuild here because TreeElement pointers will + * become invalid and operations will crash. */ + ED_region_tag_redraw_no_rebuild(ar); } set_operation_types(soops, &soops->tree, &scenelevel, &objectlevel, &idlevel, &datalevel); -- cgit v1.2.3