mirror of https://github.com/OpenTTD/OpenTTD
(svn r18252) -Fix: crash when news is shown when the end game window is opened (status bar goes missing for a while etc.)
parent
29c65215ed
commit
edc90be5b8
|
@ -812,6 +812,11 @@ void NewsLoop()
|
||||||
/* no news item yet */
|
/* no news item yet */
|
||||||
if (_total_news == 0) return;
|
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;
|
static byte _last_clean_month = 0;
|
||||||
|
|
||||||
if (_last_clean_month != _cur_month) {
|
if (_last_clean_month != _cur_month) {
|
||||||
|
|
Loading…
Reference in New Issue