summaryrefslogtreecommitdiff
path: root/servers/rendering
diff options
context:
space:
mode:
authorYuri Roubinsky <chaosus89@gmail.com>2021-10-21 19:46:05 +0300
committerYuri Roubinsky <chaosus89@gmail.com>2021-10-21 19:46:05 +0300
commit57fd362fe1cc72d9b0365779a95fac5877a9bf16 (patch)
treedfcd5e71ca1fcda6fac899bb4154d91ab5581195 /servers/rendering
parent9c9ec63e1dbd33cace4a988783f1130b4c3f06ad (diff)
Prevent shader crash when passing constant expression to `textureGather`
Diffstat (limited to 'servers/rendering')
-rw-r--r--servers/rendering/shader_language.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/servers/rendering/shader_language.cpp b/servers/rendering/shader_language.cpp
index 9c38bf7606..53f2d96f52 100644
--- a/servers/rendering/shader_language.cpp
+++ b/servers/rendering/shader_language.cpp
@@ -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) {