diff --git a/source/blender/editors/interface/templates/interface_template_node_tree_interface.cc b/source/blender/editors/interface/templates/interface_template_node_tree_interface.cc index 29bf7906274..ce0bda691a8 100644 --- a/source/blender/editors/interface/templates/interface_template_node_tree_interface.cc +++ b/source/blender/editors/interface/templates/interface_template_node_tree_interface.cc @@ -7,6 +7,7 @@ */ #include "BKE_context.hh" +#include "BKE_library.hh" #include "BKE_main_invariants.hh" #include "BKE_node_tree_interface.hh" @@ -332,6 +333,9 @@ class NodeTreeInterfaceView : public AbstractTreeView { std::unique_ptr NodeSocketViewItem::create_drag_controller() const { + if (!ID_IS_EDITABLE(&nodetree_.id)) { + return nullptr; + } return std::make_unique( static_cast(this->get_tree_view()), socket_.item, nodetree_); } @@ -343,6 +347,9 @@ std::unique_ptr NodeSocketViewItem::create_drop_target() std::unique_ptr NodePanelViewItem::create_drag_controller() const { + if (!ID_IS_EDITABLE(&nodetree_.id)) { + return nullptr; + } return std::make_unique( static_cast(this->get_tree_view()), panel_.item, nodetree_); }