summaryrefslogtreecommitdiffstats
path: root/editor/plugins/visual_shader_editor_plugin.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2024-01-26 11:44:13 +0100
committerRémi Verschelde <rverschelde@gmail.com>2024-01-26 11:44:13 +0100
commitc26a338430c7343399158edc6842e4eb4d55a9d3 (patch)
tree09420005caa4dc99b1c6659b8b0ee8b4ee16c836 /editor/plugins/visual_shader_editor_plugin.cpp
parentcd5e973d7a2402f6ddaa52e38bda1cfccf33bab0 (diff)
parentff089f8cea5ac874f1d81f73c6ac83a1b4715858 (diff)
downloadredot-engine-c26a338430c7343399158edc6842e4eb4d55a9d3.tar.gz
Merge pull request #87356 from jsjtxietian/connection-error
Check if the ref shader is valid in visual shader's `_update_option_menu`
Diffstat (limited to 'editor/plugins/visual_shader_editor_plugin.cpp')
-rw-r--r--editor/plugins/visual_shader_editor_plugin.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/editor/plugins/visual_shader_editor_plugin.cpp b/editor/plugins/visual_shader_editor_plugin.cpp
index 89fff008ea..bc02232b35 100644
--- a/editor/plugins/visual_shader_editor_plugin.cpp
+++ b/editor/plugins/visual_shader_editor_plugin.cpp
@@ -1791,7 +1791,7 @@ void VisualShaderEditor::_update_options_menu() {
}
Ref<VisualShaderNodeParameterRef> parameter_ref = Object::cast_to<VisualShaderNodeParameterRef>(vsn.ptr());
- if (parameter_ref.is_valid()) {
+ if (parameter_ref.is_valid() && parameter_ref->is_shader_valid()) {
check_result = -1;
if (members_input_port_type != VisualShaderNode::PORT_TYPE_MAX) {