summaryrefslogtreecommitdiff
path: root/src/signs.cpp
diff options
context:
space:
mode:
authorsmatz <smatz@openttd.org>2008-09-16 19:05:38 +0000
committersmatz <smatz@openttd.org>2008-09-16 19:05:38 +0000
commit5a1203963fc50139bfe4d7cab27fa32d1d6fc9dc (patch)
treead34d1c34ba491ff9a432b22a6c686dcd3d6b3e9 /src/signs.cpp
parent4a97033e7e2cbc8e028d974b1eaeee1114cc8fd6 (diff)
downloadopenttd-5a1203963fc50139bfe4d7cab27fa32d1d6fc9dc.tar.xz
(svn r14345) -Fix: delete the RenameSignWindow when 'its' sign is deleted
Also, it makes sure the RenameSignWindow isn't open when there are no signs (and crashes associted with that)
Diffstat (limited to 'src/signs.cpp')
-rw-r--r--src/signs.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/signs.cpp b/src/signs.cpp
index a2d3141b5..a9827c015 100644
--- a/src/signs.cpp
+++ b/src/signs.cpp
@@ -36,6 +36,10 @@ Sign::Sign(PlayerID owner)
Sign::~Sign()
{
free(this->name);
+
+ if (CleaningPool()) return;
+
+ DeleteRenameSignWindow(this->index);
this->owner = INVALID_PLAYER;
}