1
0
Fork 0

Merge pull request #47038 from JFonS/fix_renderer_rid_crash

[3.3] Fix crash in GLES3 renderer on release builds
This commit is contained in:
Rémi Verschelde 2021-03-22 17:51:41 +01:00 committed by GitHub
commit a2dd77867e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -4961,6 +4961,11 @@ bool RasterizerSceneGLES3::free(RID p_rid) {
LightInstance *light_instance = light_instance_owner.getptr(p_rid);
// Make sure first_directional_light is invalidated
if (p_rid == first_directional_light) {
first_directional_light = RID();
}
//remove from shadow atlases..
for (Set<RID>::Element *E = light_instance->shadow_atlases.front(); E; E = E->next()) {
ShadowAtlas *shadow_atlas = shadow_atlas_owner.get(E->get());