diff options
Diffstat (limited to 'scene/2d/navigation_polygon.cpp')
-rw-r--r-- | scene/2d/navigation_polygon.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/scene/2d/navigation_polygon.cpp b/scene/2d/navigation_polygon.cpp index c40cdb4720..21b2bede05 100644 --- a/scene/2d/navigation_polygon.cpp +++ b/scene/2d/navigation_polygon.cpp @@ -363,8 +363,11 @@ void NavigationPolygon::_bind_methods() { NavigationPolygon::NavigationPolygon() : rect_cache_dirty(true), - navmesh_generation(NULL) { - navmesh_generation = Mutex::create(); + navmesh_generation(Mutex::create()) { +} + +NavigationPolygon::~NavigationPolygon() { + memdelete(navmesh_generation); } void NavigationPolygonInstance::set_enabled(bool p_enabled) { |