diff options
author | ArthasMenethil <dinobot92t@gmail.com> | 2024-04-05 07:19:17 +0700 |
---|---|---|
committer | Arthas Menethil <tuanna10@vng.com.vn> | 2024-04-05 09:24:15 +0700 |
commit | 17e489b93da1e5497002a0513155302eef639488 (patch) | |
tree | a041b894af959fb6945a5c65ec6ad871e01a8c22 /drivers | |
parent | 79de2eaae7fb3bb8f13031ac2ec9b19128b6f471 (diff) | |
download | redot-engine-17e489b93da1e5497002a0513155302eef639488.tar.gz |
Fix OpenGL: _shadow_atlas_find_shadow: Condition "!sli" is true.
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gles3/storage/light_storage.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/gles3/storage/light_storage.cpp b/drivers/gles3/storage/light_storage.cpp index d7d77c6b8f..eebba6b00d 100644 --- a/drivers/gles3/storage/light_storage.cpp +++ b/drivers/gles3/storage/light_storage.cpp @@ -1064,7 +1064,11 @@ bool LightStorage::_shadow_atlas_find_shadow(ShadowAtlas *shadow_atlas, int *p_i for (int j = 0; j < sc; j++) { LightInstance *sli = light_instance_owner.get_or_null(sarr[j].owner); - ERR_CONTINUE(!sli); + if (!sli) { + // Found a released light instance. + found_used_idx = j; + break; + } if (sli->last_scene_pass != RasterizerSceneGLES3::get_singleton()->get_scene_pass()) { // Was just allocated, don't kill it so soon, wait a bit. |