summaryrefslogtreecommitdiff
path: root/src/waypoint.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/waypoint.cpp')
-rw-r--r--src/waypoint.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/waypoint.cpp b/src/waypoint.cpp
index cf3e746d7..f602eee6d 100644
--- a/src/waypoint.cpp
+++ b/src/waypoint.cpp
@@ -53,5 +53,5 @@ Waypoint::~Waypoint()
if (CleaningPool()) return;
DeleteWindowById(WC_WAYPOINT_VIEW, this->index);
RemoveOrderFromAllVehicles(OT_GOTO_WAYPOINT, this->index);
- _viewport_sign_kdtree.Remove(ViewportSignKdtreeItem::MakeWaypoint(this->index));
+ if (this->sign.kdtree_valid) _viewport_sign_kdtree.Remove(ViewportSignKdtreeItem::MakeWaypoint(this->index));
}