summaryrefslogtreecommitdiff
path: root/scene/resources
diff options
context:
space:
mode:
authorHaoyu Qiu <timothyqiu32@gmail.com>2021-08-02 23:50:59 +0800
committerHaoyu Qiu <timothyqiu32@gmail.com>2021-08-02 23:50:59 +0800
commitb6638cb80d67deb78a47c0b6e9a7cc843bb2485f (patch)
tree6179325e5b670e380f29ad1fa15daf1094933fb4 /scene/resources
parent2db45b62c0a4aaac11852a6f2183d3bf7db935ba (diff)
Validates set_sdfgi_cascades argument range
Diffstat (limited to 'scene/resources')
-rw-r--r--scene/resources/environment.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/scene/resources/environment.cpp b/scene/resources/environment.cpp
index 8550af8bcb..cab6c0378a 100644
--- a/scene/resources/environment.cpp
+++ b/scene/resources/environment.cpp
@@ -449,6 +449,7 @@ bool Environment::is_sdfgi_enabled() const {
}
void Environment::set_sdfgi_cascades(SDFGICascades p_cascades) {
+ ERR_FAIL_INDEX(p_cascades, SDFGI_CASCADES_8 + 1);
sdfgi_cascades = p_cascades;
_update_sdfgi();
}