summaryrefslogtreecommitdiff
path: root/src/vehicle.cpp
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2009-01-08 21:16:19 +0000
committerfrosch <frosch@openttd.org>2009-01-08 21:16:19 +0000
commiteec8c045862865d112926a41844d601f43512fbb (patch)
tree4254262254ea6b50d5e2e525886c9761cf77d415 /src/vehicle.cpp
parent10b664dbac098d01cb5fe868f709b86ab054c82f (diff)
downloadopenttd-eec8c045862865d112926a41844d601f43512fbb.tar.xz
(svn r14925) -Fix [FS#2500]: Abort dragging of vehicles in the group window when they are deleted.
Diffstat (limited to 'src/vehicle.cpp')
-rw-r--r--src/vehicle.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/vehicle.cpp b/src/vehicle.cpp
index e88854bcc..b88a1f3b7 100644
--- a/src/vehicle.cpp
+++ b/src/vehicle.cpp
@@ -32,6 +32,7 @@
#include "newgrf_station.h"
#include "newgrf_text.h"
#include "group.h"
+#include "group_gui.h"
#include "order_func.h"
#include "strings_func.h"
#include "zoom_func.h"
@@ -571,6 +572,7 @@ void Vehicle::PreDestructor()
GetCompany(this->owner)->num_engines[this->engine_type]--;
if (this->owner == _local_company) InvalidateAutoreplaceWindow(this->engine_type, this->group_id);
+ DeleteGroupHighlightOfVehicle(this);
if (IsValidGroupID(this->group_id)) GetGroup(this->group_id)->num_engines[this->engine_type]--;
if (this->IsPrimaryVehicle()) DecreaseGroupNumVehicle(this->group_id);
}