1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-11 13:10:58 +00:00

Fixes crash when calling VisualShader::set_mode

(cherry picked from commit f455f873c7)
This commit is contained in:
andybarcia
2021-02-16 14:46:20 +01:00
committed by Rémi Verschelde
parent a81f896ec1
commit 61c00938a2

View File

@@ -602,6 +602,8 @@ void VisualShader::get_node_connections(Type p_type, List<Connection> *r_connect
} }
void VisualShader::set_mode(Mode p_mode) { 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) { if (shader_mode == p_mode) {
return; return;
} }