Fix NavigationObstacle not registering to default navigation map

(cherry picked from commit fba5a4ab9a)
This commit is contained in:
Haoyu Qiu 2022-09-28 15:49:26 +08:00
parent c7c8cc399c
commit f8eed6372c
2 changed files with 2 additions and 2 deletions

View file

@ -134,7 +134,7 @@ NavigationObstacle2D::~NavigationObstacle2D() {
}
void NavigationObstacle2D::set_navigation(Navigation2D *p_nav) {
if (navigation == p_nav) {
if (navigation == p_nav && navigation != nullptr) {
return; // Pointless
}

View file

@ -140,7 +140,7 @@ NavigationObstacle::~NavigationObstacle() {
}
void NavigationObstacle::set_navigation(Navigation *p_nav) {
if (navigation == p_nav) {
if (navigation == p_nav && navigation != nullptr) {
return; // Pointless
}