Fix invalid read when using LightOccluder2D
(cherry picked from commit 7870cf24f2
)
This commit is contained in:
parent
28ae995a1a
commit
ac144e7e8c
1 changed files with 1 additions and 1 deletions
|
@ -1184,7 +1184,7 @@ void VisualServerCanvas::canvas_light_occluder_set_polygon(RID p_occluder, RID p
|
||||||
ERR_FAIL_COND(!occluder);
|
ERR_FAIL_COND(!occluder);
|
||||||
|
|
||||||
if (occluder->polygon.is_valid()) {
|
if (occluder->polygon.is_valid()) {
|
||||||
LightOccluderPolygon *occluder_poly = canvas_light_occluder_polygon_owner.get(p_polygon);
|
LightOccluderPolygon *occluder_poly = canvas_light_occluder_polygon_owner.get(occluder->polygon);
|
||||||
if (occluder_poly) {
|
if (occluder_poly) {
|
||||||
occluder_poly->owners.erase(occluder);
|
occluder_poly->owners.erase(occluder);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue