From 7d451c0040ae1c47dad6ecd58905e77bda239e7d Mon Sep 17 00:00:00 2001 From: kleonc <9283098+kleonc@users.noreply.github.com> Date: Sun, 14 Feb 2021 15:26:33 +0100 Subject: VisualShader::_input_type_changed Fix index out of bounds crash. --- scene/resources/visual_shader.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'scene/resources/visual_shader.cpp') diff --git a/scene/resources/visual_shader.cpp b/scene/resources/visual_shader.cpp index 219cd84aa0..438e130cf4 100644 --- a/scene/resources/visual_shader.cpp +++ b/scene/resources/visual_shader.cpp @@ -1597,6 +1597,7 @@ void VisualShader::_queue_update() { } void VisualShader::_input_type_changed(Type p_type, int p_id) { + ERR_FAIL_INDEX(p_type, TYPE_MAX); //erase connections using this input, as type changed Graph *g = &graph[p_type]; -- cgit v1.2.3