Merge pull request #36543 from dreamsComeTrue/navigation-2d-missing-destructor

Added missing destructor for Navigation2D
This commit is contained in:
Rémi Verschelde 2020-02-26 08:31:54 +01:00 committed by GitHub
commit 412d1f20d1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 0 deletions

View File

@ -88,3 +88,7 @@ Navigation2D::Navigation2D() {
set_cell_size(10); // Ten pixels
set_edge_connection_margin(100);
}
Navigation2D::~Navigation2D() {
Navigation2DServer::get_singleton()->free(map);
}

View File

@ -66,6 +66,7 @@ public:
RID get_closest_point_owner(const Vector2 &p_point) const;
Navigation2D();
~Navigation2D();
};
#endif // NAVIGATION_2D_H