summaryrefslogtreecommitdiff
path: root/scene/resources
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2021-08-02 18:20:58 +0200
committerGitHub <noreply@github.com>2021-08-02 18:20:58 +0200
commit737d3d31a6332c1f9d20b141b75c633953430c16 (patch)
treec466de2beeb5a881335818360789547fdfd76277 /scene/resources
parent51fac9e3c7192592081f1fe8979441ab8ff65224 (diff)
parentb6638cb80d67deb78a47c0b6e9a7cc843bb2485f (diff)
Merge pull request #51192 from timothyqiu/sdfgi-enum-range
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();
}