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:
authorJacques Lucke <jacques@blender.org>2022-10-03 20:15:06 +0300
committerJacques Lucke <jacques@blender.org>2022-10-03 20:15:06 +0300
commit72ceb7dec136ce65261692d57d8d1251a30c5352 (patch)
treea3e6e1fd631a5f465f90769a6d73ac1e2da03284 /source/blender/nodes/intern
parent13b3c408e39a232e0c676cf2e8ab9125f2554bf1 (diff)
Fix: crash when linked geometry node group is missing
Diffstat (limited to 'source/blender/nodes/intern')
-rw-r--r--source/blender/nodes/intern/geometry_nodes_lazy_function.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/nodes/intern/geometry_nodes_lazy_function.cc b/source/blender/nodes/intern/geometry_nodes_lazy_function.cc
index eca0bef3e65..553b33ee5ea 100644
--- a/source/blender/nodes/intern/geometry_nodes_lazy_function.cc
+++ b/source/blender/nodes/intern/geometry_nodes_lazy_function.cc
@@ -28,6 +28,8 @@
#include "FN_field_cpp_type.hh"
#include "FN_lazy_function_graph_executor.hh"
+#include "DEG_depsgraph_query.h"
+
namespace blender::nodes {
using fn::ValueOrField;
@@ -1291,6 +1293,11 @@ const GeometryNodesLazyFunctionGraphInfo *ensure_geometry_nodes_lazy_function_gr
if (btree.has_available_link_cycle()) {
return nullptr;
}
+ if (const ID *id_orig = DEG_get_original_id(const_cast<ID *>(&btree.id))) {
+ if (id_orig->tag & LIB_TAG_MISSING) {
+ return nullptr;
+ }
+ }
std::unique_ptr<GeometryNodesLazyFunctionGraphInfo> &lf_graph_info_ptr =
btree.runtime->geometry_nodes_lazy_function_graph_info;