瀏覽代碼

VisualShader::_input_type_changed Fix index out of bounds crash.

kleonc 4 年之前
父節點
當前提交
7d451c0040
共有 1 個文件被更改,包括 1 次插入0 次删除
  1. 1 0
      scene/resources/visual_shader.cpp

+ 1 - 0
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];