summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorBastiaan Olij <mux213@gmail.com>2022-05-28 21:09:23 +1000
committerBastiaan Olij <mux213@gmail.com>2022-06-01 20:47:32 +1000
commit69b66ec4254def097fe4e35501a68833bfcee67f (patch)
tree68a1088185fc077fe34080b0e4921da2bfee3e88 /drivers
parent0810b0d4714943d00a28a2b6d1e206a51db6619f (diff)
Ensure has_os_features is safely called as it can't be called from within the construct of RenderingServerDefault on which it relies
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gles3/rasterizer_storage_gles3.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gles3/rasterizer_storage_gles3.cpp b/drivers/gles3/rasterizer_storage_gles3.cpp
index 49c5045453..012cda953c 100644
--- a/drivers/gles3/rasterizer_storage_gles3.cpp
+++ b/drivers/gles3/rasterizer_storage_gles3.cpp
@@ -442,6 +442,10 @@ bool RasterizerStorageGLES3::free(RID p_rid) {
}
bool RasterizerStorageGLES3::has_os_feature(const String &p_feature) const {
+ if (!config) {
+ return false;
+ }
+
if (p_feature == "rgtc") {
return config->rgtc_supported;
}