From 08fd0030d25777b4eb081f6393bd8a123d7b4941 Mon Sep 17 00:00:00 2001 From: rubidium Date: Fri, 28 Sep 2007 17:04:52 +0000 Subject: (svn r11180) -Fix (r11175): crash on load when you don't have any NewGRFs. More interesting is: who plays without them ;) --- src/newgrf_config.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/newgrf_config.cpp b/src/newgrf_config.cpp index 3a4c0cb44..f09a571fc 100644 --- a/src/newgrf_config.cpp +++ b/src/newgrf_config.cpp @@ -406,6 +406,7 @@ void ScanNewGRFFiles() } DEBUG(grf, 1, "Scan complete, found %d files", num); + if (num == 0 || _all_grfs == NULL) return; /* Sort the linked list using quicksort. * For that we first have to make an array, the qsort and -- cgit v1.2.3-54-g00ecf