[Bf-blender-cvs] [d2c41293a01] blender2.8: Fix T57831: Crash with multi-select / delete of the same object in Collection outliner.

Bastien Montagne noreply at git.blender.org
Thu Nov 15 12:27:04 CET 2018


Commit: d2c41293a010e10bb5f79505686d663ec3bd11b3
Author: Bastien Montagne
Date:   Thu Nov 15 12:24:51 2018 +0100
Branches: blender2.8
https://developer.blender.org/rBd2c41293a010e10bb5f79505686d663ec3bd11b3

Fix T57831: Crash with multi-select / delete of the same object in Collection outliner.

Tssst… that piece of code should have been removed when we got rid of
bases here, kind of obvious it would break if object pointer itself is
NULL! And since deleting an object clears its ID pointers in outliner
tree, this fixes for free the issue of deleting several time the same
object (being selected in several collections at once).

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

M	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 85546c98acd..a9212a99eb8 100644
--- a/source/blender/editors/space_outliner/outliner_tools.c
+++ b/source/blender/editors/space_outliner/outliner_tools.c
@@ -430,8 +430,8 @@ static void object_deselect_cb(
 }
 
 static void object_delete_cb(
-        bContext *C, ReportList *reports, Scene *scene, TreeElement *te,
-        TreeStoreElem *tsep, TreeStoreElem *tselem, void *user_data)
+        bContext *C, ReportList *reports, Scene *scene, TreeElement *UNUSED(te),
+        TreeStoreElem *UNUSED(tsep), TreeStoreElem *tselem, void *UNUSED(user_data))
 {
 	Object *ob = (Object *)tselem->id;
 	if (ob) {
@@ -460,13 +460,6 @@ static void object_delete_cb(
 		tselem->id = NULL;
 #endif
 	}
-	else {
-		/* No base, means object is no more instantiated in any scene.
-		 * Should not happen ideally, but does happens, see T51625.
-		 * Rather than twisting in all kind of ways to address all possible cases leading to that situation, simpler
-		 * to allow deleting such object as a mere generic data-block. */
-		id_delete_cb(C, reports, scene, te, tsep, tselem, user_data);
-	}
 }
 
 static void id_local_cb(



More information about the Bf-blender-cvs mailing list