summaryrefslogtreecommitdiff
path: root/src/station.cpp
diff options
context:
space:
mode:
authorsmatz <smatz@openttd.org>2008-09-13 10:19:51 +0000
committersmatz <smatz@openttd.org>2008-09-13 10:19:51 +0000
commit66be028ad4bb32758115ad10e542104b80d79eed (patch)
tree13719aee50b7d6e902e7f4499a4cd1c9311ea099 /src/station.cpp
parentfc62d736f700ca344531a96ca02324695af8d761 (diff)
downloadopenttd-66be028ad4bb32758115ad10e542104b80d79eed.tar.xz
(svn r14307) -Fix: when deleting a station, remove news items regarding it
Diffstat (limited to 'src/station.cpp')
-rw-r--r--src/station.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/station.cpp b/src/station.cpp
index 4a7ac92f0..b74ef3783 100644
--- a/src/station.cpp
+++ b/src/station.cpp
@@ -31,6 +31,7 @@
#include "settings_type.h"
#include "command_func.h"
#include "order_func.h"
+#include "news_func.h"
#include "table/sprites.h"
#include "table/strings.h"
@@ -84,6 +85,9 @@ Station::~Station()
/* Subsidies need removal as well */
DeleteSubsidyWithStation(index);
+ /* Remove all news items */
+ DeleteStationNews(this->index);
+
xy = 0;
for (CargoID c = 0; c < NUM_CARGO; c++) {