diff options
author | frosch <frosch@openttd.org> | 2009-12-21 21:14:40 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2009-12-21 21:14:40 +0000 |
commit | 8d8bd3d45fc899618fbda5e3ff1f1df0d1ad638b (patch) | |
tree | 78934c16797448b12c5399bd7c2ceac11190984d /src/statusbar_gui.cpp | |
parent | a87748df8aa8f1a862348ecd24eda9e6b8b36495 (diff) | |
download | openttd-8d8bd3d45fc899618fbda5e3ff1f1df0d1ad638b.tar.xz |
(svn r18597) -Fix (r17147)[FS#3395, FS#3396]: ChangeVehicleNews() did not update the news ticker.
Diffstat (limited to 'src/statusbar_gui.cpp')
-rw-r--r-- | src/statusbar_gui.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/statusbar_gui.cpp b/src/statusbar_gui.cpp index 79b26156f..93e1d50a9 100644 --- a/src/statusbar_gui.cpp +++ b/src/statusbar_gui.cpp @@ -161,9 +161,9 @@ struct StatusBarWindow : Window { DrawString(r.left + WD_FRAMERECT_LEFT, r.right - WD_FRAMERECT_RIGHT, r.top + WD_FRAMERECT_TOP, STR_STATUSBAR_AUTOSAVE, TC_FROMSTRING, SA_CENTER); } else if (_pause_mode != PM_UNPAUSED) { DrawString(r.left + WD_FRAMERECT_LEFT, r.right - WD_FRAMERECT_RIGHT, r.top + WD_FRAMERECT_TOP, STR_STATUSBAR_PAUSED, TC_FROMSTRING, SA_CENTER); - } else if (this->ticker_scroll < TICKER_STOP && FindWindowById(WC_NEWS_WINDOW, 0) == NULL && _statusbar_news_item.string_id != 0) { + } else if (this->ticker_scroll < TICKER_STOP && FindWindowById(WC_NEWS_WINDOW, 0) == NULL && _statusbar_news_item != NULL && _statusbar_news_item->string_id != 0) { /* Draw the scrolling news text */ - if (!DrawScrollingStatusText(&_statusbar_news_item, this->ticker_scroll, r.left + WD_FRAMERECT_LEFT, r.right - WD_FRAMERECT_RIGHT, r.top + WD_FRAMERECT_TOP, r.bottom)) { + if (!DrawScrollingStatusText(_statusbar_news_item, this->ticker_scroll, r.left + WD_FRAMERECT_LEFT, r.right - WD_FRAMERECT_RIGHT, r.top + WD_FRAMERECT_TOP, r.bottom)) { InvalidateWindowData(WC_STATUS_BAR, 0, SBI_NEWS_DELETED); if (Company::IsValidID(_local_company)) { /* This is the default text */ |