Skip to content

Commit

Permalink
Fix OpenGL: _shadow_atlas_find_shadow: Condition "!sli" is true.
Browse files Browse the repository at this point in the history
  • Loading branch information
Arthas92t authored and Arthas Menethil committed Apr 5, 2024
1 parent 79de2ea commit 17e489b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion drivers/gles3/storage/light_storage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 17e489b

Please sign in to comment.