diff options
author | smatz <smatz@openttd.org> | 2009-09-22 18:50:58 +0000 |
---|---|---|
committer | smatz <smatz@openttd.org> | 2009-09-22 18:50:58 +0000 |
commit | de96f4d309da91471f0641f7940d4f6ff1d56c8f (patch) | |
tree | 8441e8c7d91c4ebba124709728e4baae17a7bb63 /src/town_cmd.cpp | |
parent | cc5acdf30429d3677199611b9994b3f640b1dab3 (diff) | |
download | openttd-de96f4d309da91471f0641f7940d4f6ff1d56c8f.tar.xz |
(svn r17614) -Fix: crash when deleting town while TownDirectory is open
Diffstat (limited to 'src/town_cmd.cpp')
-rw-r--r-- | src/town_cmd.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/town_cmd.cpp b/src/town_cmd.cpp index 6d8a4c31e..bc0b09853 100644 --- a/src/town_cmd.cpp +++ b/src/town_cmd.cpp @@ -78,7 +78,6 @@ Town::~Town() /* Delete town authority window * and remove from list of sorted towns */ DeleteWindowById(WC_TOWN_VIEW, this->index); - InvalidateWindowData(WC_TOWN_DIRECTORY, 0, 0); /* Delete all industries belonging to the town */ FOR_ALL_INDUSTRIES(i) if (i->town == this) delete i; @@ -121,6 +120,7 @@ Town::~Town() */ void Town::PostDestructor(size_t index) { + InvalidateWindowData(WC_TOWN_DIRECTORY, 0, 0); UpdateNearestTownForRoadTiles(false); } |