Commit: d0cf7a3e85da3135535dd5c37c5eed8a82d13f1d
Author: Nathan Craddock
Date:   Sat Aug 15 20:56:15 2020 -0600
Branches: soc-2020-outliner
https://developer.blender.org/rBd0cf7a3e85da3135535dd5c37c5eed8a82d13f1d

Outliner: Fix crash on id delete collections

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

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 f141ce10402..108fb9daaa7 100644
--- a/source/blender/editors/space_outliner/outliner_tools.c
+++ b/source/blender/editors/space_outliner/outliner_tools.c
@@ -400,7 +400,8 @@ static void outliner_do_libdata_operation(bContext *C,
   for (te = lb->first; te; te = te->next) {
     tselem = TREESTORE(te);
     if (tselem->flag & TSE_SELECTED) {
-      if (ELEM(tselem->type, 0, TSE_LAYER_COLLECTION)) {
+      /* TODO (Nathan): Why is TSE_LAYER_COLLECTION an exception here? */
+      if ((tselem->type == 0 && te->idcode != 0) /* || tselem->type == 
TSE_LAYER_COLLECTION*/) {
         TreeStoreElem *tsep = te->parent ? TREESTORE(te->parent) : NULL;
         operation_fn(C, reports, scene, te, tsep, tselem, user_data);
       }

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to