Fix NavigationObstacle not registering to default navigation map
(cherry picked from commit fba5a4ab9a
)
This commit is contained in:
parent
c7c8cc399c
commit
f8eed6372c
2 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue