summaryrefslogtreecommitdiffstats
path: root/scene/2d/navigation_region_2d.cpp
diff options
context:
space:
mode:
authorAdam Scott <ascott.ca@gmail.com>2022-12-12 12:42:37 -0500
committerAdam Scott <ascott.ca@gmail.com>2022-12-29 16:23:38 -0500
commitea33001b95d57f7b400d78d4b20bef23293d9077 (patch)
tree71ac58a0294e7417e42601cd46fccaac4bcbbe2e /scene/2d/navigation_region_2d.cpp
parenta75493091823020d858fabadbfa5994da0d658cb (diff)
downloadredot-engine-ea33001b95d57f7b400d78d4b20bef23293d9077.tar.gz
Add safety-checks before some servers `free()`
Diffstat (limited to 'scene/2d/navigation_region_2d.cpp')
-rw-r--r--scene/2d/navigation_region_2d.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/scene/2d/navigation_region_2d.cpp b/scene/2d/navigation_region_2d.cpp
index 675ef7c780..78c65256e8 100644
--- a/scene/2d/navigation_region_2d.cpp
+++ b/scene/2d/navigation_region_2d.cpp
@@ -343,6 +343,7 @@ NavigationRegion2D::NavigationRegion2D() {
}
NavigationRegion2D::~NavigationRegion2D() {
+ ERR_FAIL_NULL(NavigationServer2D::get_singleton());
NavigationServer2D::get_singleton()->free(region);
#ifdef DEBUG_ENABLED