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:
authorBastien Montagne <montagne29@wanadoo.fr>2018-11-15 14:24:51 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2018-11-15 14:26:55 +0300
commitd2c41293a010e10bb5f79505686d663ec3bd11b3 (patch)
tree49c4b489b4723c5315a1e7786025087a8ce94b98 /source/blender/editors/space_outliner
parente318da53508d2ee9a2e6ccc04ce31674a2c17986 (diff)
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).
Diffstat (limited to 'source/blender/editors/space_outliner')
-rw-r--r--source/blender/editors/space_outliner/outliner_tools.c11
1 files changed, 2 insertions, 9 deletions
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(