1
0
mirror of https://github.com/godotengine/godot.git synced 2026-01-08 20:03:48 +00:00

Merge pull request #46097 from AndyBarcia/FixCrash

Fixes crash when using VisualShader::set_mode with invalid mode
This commit is contained in:
Rémi Verschelde
2021-02-16 19:29:28 +01:00
committed by GitHub

View File

@@ -675,6 +675,8 @@ void VisualShader::get_node_connections(Type p_type, List<Connection> *r_connect
}
void VisualShader::set_mode(Mode p_mode) {
ERR_FAIL_INDEX_MSG(p_mode, Mode::MODE_MAX, vformat("Invalid shader mode: %d.", p_mode));
if (shader_mode == p_mode) {
return;
}