summaryrefslogtreecommitdiffstats
path: root/drivers/gles3/shader_gles3.cpp
diff options
context:
space:
mode:
authorjsjtxietian <jsjtxietian@outlook.com>2024-01-12 11:17:57 +0800
committerjsjtxietian <jsjtxietian@outlook.com>2024-01-12 17:34:33 +0800
commita365c070b34068a00463f4c9414010309f9c7920 (patch)
tree1423c09f73cf3c393c61ea1a2db42902d767f30b /drivers/gles3/shader_gles3.cpp
parent352434668923978f54f2236f20116fc96ebc9173 (diff)
downloadredot-engine-a365c070b34068a00463f4c9414010309f9c7920.tar.gz
Add shader_cache_dir_valid check to _save_to_cache
Diffstat (limited to 'drivers/gles3/shader_gles3.cpp')
-rw-r--r--drivers/gles3/shader_gles3.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gles3/shader_gles3.cpp b/drivers/gles3/shader_gles3.cpp
index 8b5aaa6b8d..27402da7c8 100644
--- a/drivers/gles3/shader_gles3.cpp
+++ b/drivers/gles3/shader_gles3.cpp
@@ -611,6 +611,7 @@ void ShaderGLES3::_save_to_cache(Version *p_version) {
#ifdef WEB_ENABLED // not supported in webgl
return;
#else
+ ERR_FAIL_COND(!shader_cache_dir_valid);
#if !defined(ANDROID_ENABLED) && !defined(IOS_ENABLED)
if (RasterizerGLES3::is_gles_over_gl() && (glGetProgramBinary == NULL)) { // ARB_get_program_binary extension not available.
return;