diff options
author | glx22 <glx@openttd.org> | 2021-05-15 23:12:25 +0200 |
---|---|---|
committer | Loïc Guilloux <glx22@users.noreply.github.com> | 2021-05-29 21:08:25 +0200 |
commit | 994bf19aef3dde6c9482434bdc51688f76a937ea (patch) | |
tree | 9b45b82d460cb00733144ba0dd64ebc6fde478c2 /src/signs_gui.cpp | |
parent | ef991b1772f5f8b4874f76ea715a9a95811ad979 (diff) | |
download | openttd-994bf19aef3dde6c9482434bdc51688f76a937ea.tar.xz |
Fix f6d5c01: Delay deletion when closing windows
Diffstat (limited to 'src/signs_gui.cpp')
-rw-r--r-- | src/signs_gui.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/signs_gui.cpp b/src/signs_gui.cpp index 93c4dd431..d7d93c905 100644 --- a/src/signs_gui.cpp +++ b/src/signs_gui.cpp @@ -527,7 +527,7 @@ struct SignWindow : Window, SignList { FALLTHROUGH; case WID_QES_CANCEL: - delete this; + this->Close(); break; } } @@ -592,5 +592,5 @@ void DeleteRenameSignWindow(SignID sign) { SignWindow *w = dynamic_cast<SignWindow *>(FindWindowById(WC_QUERY_STRING, WN_QUERY_STRING_SIGN)); - if (w != nullptr && w->cur_sign == sign) delete w; + if (w != nullptr && w->cur_sign == sign) w->Close(); } |