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/resources/world_3d.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'scene/resources/world_3d.cpp') diff --git a/scene/resources/world_3d.cpp b/scene/resources/world_3d.cpp index ae8c9a182f..8808da95d7 100644 --- a/scene/resources/world_3d.cpp +++ b/scene/resources/world_3d.cpp @@ -157,6 +157,9 @@ World3D::World3D() { } World3D::~World3D() { + ERR_FAIL_NULL(PhysicsServer3D::get_singleton()); + ERR_FAIL_NULL(RenderingServer::get_singleton()); + ERR_FAIL_NULL(NavigationServer3D::get_singleton()); PhysicsServer3D::get_singleton()->free(space); RenderingServer::get_singleton()->free(scenario); NavigationServer3D::get_singleton()->free(navigation_map); -- cgit v1.2.3