1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-09-02 19:39:12 +00:00

(svn r93) Fix: memory leak in news system (blathijs)

This commit is contained in:
dominik
2004-08-20 15:37:44 +00:00
parent 4f253c2656
commit c55eda92f8

View File

@@ -338,7 +338,11 @@ static void ShowTicker(NewsItem *ni)
static bool ReadyForNextItem() static bool ReadyForNextItem()
{ {
Window *w; Window *w;
NewsItem *ni = &_news_items[(_forced_news==255)?_current_news:_forced_news]; byte item = (_forced_news==255)?_current_news:_forced_news;
NewsItem *ni;
if(item>=MAX_NEWS) return false;
ni = &_news_items[item];
// Ticker message // Ticker message
// Check if the status bar message is still being displayed? // Check if the status bar message is still being displayed?