summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2011-12-11 12:20:02 +0000
committerrubidium <rubidium@openttd.org>2011-12-11 12:20:02 +0000
commitf3b78bf076724b10d5e70fdac7babca228447b78 (patch)
tree7b9d3be4f385d591d1fdb622d3b288fcf36ec93d
parente0e5e51e2a015d6901730f8edcd4187161ce9901 (diff)
downloadopenttd-f3b78bf076724b10d5e70fdac7babca228447b78.tar.xz
(svn r23493) -Fix (r23476): clearing errors didn't clear the currently shown critical error
-rw-r--r--src/error_gui.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/error_gui.cpp b/src/error_gui.cpp
index a7179079a..31a887cc7 100644
--- a/src/error_gui.cpp
+++ b/src/error_gui.cpp
@@ -301,6 +301,7 @@ public:
*/
void ClearErrorMessages()
{
+ UnshowCriticalError();
_errors.clear();
}
@@ -322,7 +323,7 @@ void ShowFirstError()
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;