Merge pull request #54082 from Chaosus/fix_shader_crash

This commit is contained in:
Yuri Roubinsky 2021-10-21 21:19:24 +03:00 committed by GitHub
commit bbcf8ac672
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2763,6 +2763,7 @@ bool ShaderLanguage::_validate_function_call(BlockNode *p_block, const FunctionI
bool is_const = false;
ConstantNode::Value value;
value.sint = -1;
_find_identifier(p_block, false, p_function_info, vn->name, nullptr, nullptr, &is_const, nullptr, nullptr, &value);
if (!is_const || value.sint < min || value.sint > max) {