You've already forked godot
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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user