diff options
Diffstat (limited to 'scene/2d/light_occluder_2d.cpp')
-rw-r--r-- | scene/2d/light_occluder_2d.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/scene/2d/light_occluder_2d.cpp b/scene/2d/light_occluder_2d.cpp index 67e82140e4..e7997c6eff 100644 --- a/scene/2d/light_occluder_2d.cpp +++ b/scene/2d/light_occluder_2d.cpp @@ -148,6 +148,7 @@ OccluderPolygon2D::OccluderPolygon2D() { } OccluderPolygon2D::~OccluderPolygon2D() { + ERR_FAIL_NULL(RenderingServer::get_singleton()); RS::get_singleton()->free(occ_polygon); } @@ -291,5 +292,7 @@ LightOccluder2D::LightOccluder2D() { } LightOccluder2D::~LightOccluder2D() { + ERR_FAIL_NULL(RenderingServer::get_singleton()); + RS::get_singleton()->free(occluder); } |