summaryrefslogtreecommitdiff
path: root/servers/rendering
diff options
context:
space:
mode:
authorHaoyu Qiu <timothyqiu32@gmail.com>2022-01-17 16:02:26 +0800
committerHaoyu Qiu <timothyqiu32@gmail.com>2022-01-17 16:02:26 +0800
commit7870cf24f28ed93c9a105d31d454d02c1a79ad88 (patch)
tree5b4f7522a7f17b0e930c3895b5fbdd2bd057cf43 /servers/rendering
parent8958e1b35297baa8ef4f9e03bb4ad105500e3a0c (diff)
Fix invalid read when using LightOccluder2D
Diffstat (limited to 'servers/rendering')
-rw-r--r--servers/rendering/renderer_canvas_cull.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/servers/rendering/renderer_canvas_cull.cpp b/servers/rendering/renderer_canvas_cull.cpp
index f5e2cbcd6c..418d2bc42e 100644
--- a/servers/rendering/renderer_canvas_cull.cpp
+++ b/servers/rendering/renderer_canvas_cull.cpp
@@ -1440,7 +1440,7 @@ void RendererCanvasCull::canvas_light_occluder_set_polygon(RID p_occluder, RID p
ERR_FAIL_COND(!occluder);
if (occluder->polygon.is_valid()) {
- LightOccluderPolygon *occluder_poly = canvas_light_occluder_polygon_owner.get_or_null(p_polygon);
+ LightOccluderPolygon *occluder_poly = canvas_light_occluder_polygon_owner.get_or_null(occluder->polygon);
if (occluder_poly) {
occluder_poly->owners.erase(occluder);
}