Skip to content

Commit

Permalink
Fixes crash when calling VisualShader::set_mode
Browse files Browse the repository at this point in the history
  • Loading branch information
AndyBarcia committed Feb 16, 2021
1 parent cb64f2d commit f455f87
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions scene/resources/visual_shader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit f455f87

Please sign in to comment.