Fix NavigationObstacle2D::set_navigation.

This commit is contained in:
Relintai 2023-09-02 12:31:55 +02:00
parent 76488d4381
commit 61bf4df2f4

View File

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