Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2011-11-25 00:24:03 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2011-11-25 00:24:03 +0400
commited6aaace52564ab686f4bfdd682bf85c4eb78c66 (patch)
tree82ab7f6fa480faa5b4ff882dee4b8ac39e7d55fa /source/blender/editors/space_outliner
parentd0b7fb5fdf90f09748f94a21e205be7f31ebbb25 (diff)
Fix #29371: crash deleting objects in outliner. This was introduced in the
bugfix for #28467, it deleted outliner tree while still traversing it.
Diffstat (limited to 'source/blender/editors/space_outliner')
-rw-r--r--source/blender/editors/space_outliner/outliner_tools.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/source/blender/editors/space_outliner/outliner_tools.c b/source/blender/editors/space_outliner/outliner_tools.c
index 27ad2c4fd6d..f4e46d0255d 100644
--- a/source/blender/editors/space_outliner/outliner_tools.c
+++ b/source/blender/editors/space_outliner/outliner_tools.c
@@ -297,8 +297,6 @@ static void object_delete_cb(bContext *C, Scene *scene, TreeElement *te, TreeSto
if(base==NULL)
base= object_in_scene((Object *)tselem->id, scene);
if(base) {
- SpaceOops *soops= CTX_wm_space_outliner(C);
-
// check also library later
if(scene->obedit==base->object)
ED_object_exit_editmode(C, EM_FREEDATA|EM_FREEUNDO|EM_WAITCURSOR|EM_DO_UNDO);
@@ -306,15 +304,7 @@ static void object_delete_cb(bContext *C, Scene *scene, TreeElement *te, TreeSto
ED_base_object_free_and_unlink(CTX_data_main(C), scene, base);
te->directdata= NULL;
tselem->id= NULL;
-
- /* XXX: tree management normally happens from draw_outliner(), but when
- you're clicking to fast on Delete object from context menu in
- outliner several mouse events can be handled in one cycle without
- handling notifiers/redraw which leads to deleting the same object twice.
- cleanup tree here to prevent such cases. */
- outliner_cleanup_tree(soops);
}
-
}
static void id_local_cb(bContext *UNUSED(C), Scene *UNUSED(scene), TreeElement *UNUSED(te), TreeStoreElem *UNUSED(tsep), TreeStoreElem *tselem)
@@ -579,6 +569,14 @@ static int outliner_object_operation_exec(bContext *C, wmOperator *op)
}
else if(event==4) {
outliner_do_object_operation(C, scene, soops, &soops->tree, object_delete_cb);
+
+ /* XXX: tree management normally happens from draw_outliner(), but when
+ you're clicking to fast on Delete object from context menu in
+ outliner several mouse events can be handled in one cycle without
+ handling notifiers/redraw which leads to deleting the same object twice.
+ cleanup tree here to prevent such cases. */
+ outliner_cleanup_tree(soops);
+
DAG_scene_sort(bmain, scene);
str= "Delete Objects";
WM_event_add_notifier(C, NC_SCENE|ND_OB_ACTIVE, scene);