From 61bf4df2f4e802b6b13f83b3c3a47eedd97d0bf8 Mon Sep 17 00:00:00 2001 From: Relintai Date: Sat, 2 Sep 2023 12:31:55 +0200 Subject: [PATCH] Fix NavigationObstacle2D::set_navigation. --- scene/2d/navigation_obstacle_2d.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scene/2d/navigation_obstacle_2d.cpp b/scene/2d/navigation_obstacle_2d.cpp index f3fa9e374..cccc540aa 100644 --- a/scene/2d/navigation_obstacle_2d.cpp +++ b/scene/2d/navigation_obstacle_2d.cpp @@ -188,7 +188,7 @@ NavigationObstacle2D::~NavigationObstacle2D() { } void NavigationObstacle2D::set_navigation(Navigation2D *p_nav) { - if (navigation == p_nav) { + if (navigation == p_nav && navigation != nullptr) { return; // Pointless }