[Bf-blender-cvs] [de3fda29c79] blender-v3.0-release: Fix T93054: crash when deleting a missed linked file

Jacques Lucke noreply at git.blender.org
Fri Nov 19 10:16:09 CET 2021


Commit: de3fda29c79f143d0bc251ded5bcbf4613417247
Author: Jacques Lucke
Date:   Fri Nov 19 10:15:58 2021 +0100
Branches: blender-v3.0-release
https://developer.blender.org/rBde3fda29c79f143d0bc251ded5bcbf4613417247

Fix T93054: crash when deleting a missed linked file

This is a bit similar to rBb7260ca4c9f4b7618c9c214f1270e31d6ed9886b.
Sometimes a group node may not reference a node group
because it was linked and can't be found.

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

M	source/blender/nodes/intern/derived_node_tree.cc

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

diff --git a/source/blender/nodes/intern/derived_node_tree.cc b/source/blender/nodes/intern/derived_node_tree.cc
index 14d6c77299b..8a9386c1137 100644
--- a/source/blender/nodes/intern/derived_node_tree.cc
+++ b/source/blender/nodes/intern/derived_node_tree.cc
@@ -167,7 +167,11 @@ DInputSocket DOutputSocket::get_active_corresponding_group_output_socket() const
   BLI_assert(socket_ref_->node().is_group_node());
 
   const DTreeContext *child_context = context_->child_context(socket_ref_->node());
-  BLI_assert(child_context != nullptr);
+  if (child_context == nullptr) {
+    /* Can happen when the group node references a non-existant group (e.g. when the group is
+     * linked but the original file is not found). */
+    return {};
+  }
 
   const NodeTreeRef &child_tree = child_context->tree();
   Span<const NodeRef *> group_output_nodes = child_tree.nodes_by_type("NodeGroupOutput");



More information about the Bf-blender-cvs mailing list