From ea33001b95d57f7b400d78d4b20bef23293d9077 Mon Sep 17 00:00:00 2001 From: Adam Scott Date: Mon, 12 Dec 2022 12:42:37 -0500 Subject: Add safety-checks before some servers `free()` --- scene/3d/voxel_gi.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'scene/3d/voxel_gi.cpp') diff --git a/scene/3d/voxel_gi.cpp b/scene/3d/voxel_gi.cpp index 7caf2f4874..2cb15715c6 100644 --- a/scene/3d/voxel_gi.cpp +++ b/scene/3d/voxel_gi.cpp @@ -242,6 +242,7 @@ VoxelGIData::VoxelGIData() { } VoxelGIData::~VoxelGIData() { + ERR_FAIL_NULL(RenderingServer::get_singleton()); RS::get_singleton()->free(probe); } @@ -516,5 +517,6 @@ VoxelGI::VoxelGI() { } VoxelGI::~VoxelGI() { + ERR_FAIL_NULL(RenderingServer::get_singleton()); RS::get_singleton()->free(voxel_gi); } -- cgit v1.2.3