summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/depot_gui.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/depot_gui.cpp b/src/depot_gui.cpp
index c6338cba7..866ce14e5 100644
--- a/src/depot_gui.cpp
+++ b/src/depot_gui.cpp
@@ -1072,7 +1072,6 @@ void DeleteDepotHighlightOfVehicle(const Vehicle *v)
w = dynamic_cast<DepotWindow*>(FindWindowById(WC_VEHICLE_DEPOT, v->tile));
if (w != NULL) {
- w->sel = INVALID_VEHICLE;
- ResetObjectToPlace();
+ if (w->sel == v->index) ResetObjectToPlace();
}
}