Mercurial > hg > openttd
changeset 18646:2c62497776ce draft
(svn r23493) -Fix (r23476): clearing errors didn't clear the currently shown critical error
author | rubidium <rubidium@openttd.org> |
---|---|
date | Sun, 11 Dec 2011 12:20:02 +0000 |
parents | 7916e135df26 |
children | a52c4c1e219f |
files | src/error_gui.cpp |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/error_gui.cpp +++ b/src/error_gui.cpp @@ -301,6 +301,7 @@ */ void ClearErrorMessages() { + UnshowCriticalError(); _errors.clear(); } @@ -322,7 +323,7 @@ void UnshowCriticalError() { ErrmsgWindow *w = (ErrmsgWindow*)FindWindowById(WC_ERRMSG, 0); - if (w != NULL) { + if (_window_system_initialized && w != NULL) { if (w->IsCritical()) _errors.push_front(*w); _window_system_initialized = false; delete w;