summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2009-11-23 13:01:12 +0000
committerrubidium <rubidium@openttd.org>2009-11-23 13:01:12 +0000
commitedc90be5b870c20ecb3b2903bf382eb93935e3b0 (patch)
tree3ebaf4b195160691189f57c7e3ccbb24d93be787 /src
parent29c65215edd39dacb074318b4a76a8c17bc989b4 (diff)
downloadopenttd-edc90be5b870c20ecb3b2903bf382eb93935e3b0.tar.xz
(svn r18252) -Fix: crash when news is shown when the end game window is opened (status bar goes missing for a while etc.)
Diffstat (limited to 'src')
-rw-r--r--src/news_gui.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/news_gui.cpp b/src/news_gui.cpp
index 9f5708626..57881358c 100644
--- a/src/news_gui.cpp
+++ b/src/news_gui.cpp
@@ -812,6 +812,11 @@ void NewsLoop()
/* no news item yet */
if (_total_news == 0) return;
+ /* There is no status bar, so no reason to show news;
+ * especially important with the end game screen when
+ * there is no status bar but possible news. */
+ if (FindWindowById(WC_STATUS_BAR, 0) == NULL) return;
+
static byte _last_clean_month = 0;
if (_last_clean_month != _cur_month) {