summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2018-08-13 20:47:24 +0200
committerGitHub <noreply@github.com>2018-08-13 20:47:24 +0200
commit641dd15b1dafb0259d24c3fd1c52819a89b67a91 (patch)
tree7fdccf9f53dd25aebbd9418798e30bcae181b370
parent4170aa3f39baa9fe10e156386964d76a4b99978c (diff)
parent2a02f44ad959ed3ac24a36688c74a1284c9a8a74 (diff)
Merge pull request #20953 from hpvb/fix-20322
Don't try to update the visual shader graph if it doesn't exist yet
-rw-r--r--editor/plugins/visual_shader_editor_plugin.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/editor/plugins/visual_shader_editor_plugin.cpp b/editor/plugins/visual_shader_editor_plugin.cpp
index 9218fed907..63e89b78ea 100644
--- a/editor/plugins/visual_shader_editor_plugin.cpp
+++ b/editor/plugins/visual_shader_editor_plugin.cpp
@@ -119,6 +119,9 @@ void VisualShaderEditor::_update_graph() {
if (updating)
return;
+ if (visual_shader.is_null())
+ return;
+
graph->set_scroll_ofs(visual_shader->get_graph_offset() * EDSCALE);
VisualShader::Type type = VisualShader::Type(edit_type->get_selected());