mirror of
https://github.com/godotengine/godot.git
synced 2024-11-21 19:42:43 +00:00
Fix editor crash when shader has incorrect global array declaration
This commit is contained in:
parent
e343dbbcc1
commit
38fad35356
@ -7411,6 +7411,9 @@ Error ShaderLanguage::_parse_block(BlockNode *p_block, const FunctionInfo &p_fun
|
||||
return ERR_PARSE_ERROR;
|
||||
}
|
||||
tk = _get_token();
|
||||
} else {
|
||||
_set_expected_error("(");
|
||||
return ERR_PARSE_ERROR;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@ -9520,6 +9523,9 @@ Error ShaderLanguage::_parse_shader(const HashMap<StringName, FunctionInfo> &p_f
|
||||
_set_error(RTR("Array size mismatch."));
|
||||
return ERR_PARSE_ERROR;
|
||||
}
|
||||
} else {
|
||||
_set_expected_error("(");
|
||||
return ERR_PARSE_ERROR;
|
||||
}
|
||||
|
||||
array_size = constant.array_size;
|
||||
|
Loading…
Reference in New Issue
Block a user