changeset 7649:67e8afd7e797 draft

(svn r11180) -Fix (r11175): crash on load when you don't have any NewGRFs. More interesting is: who plays without them ;)
author rubidium <rubidium@openttd.org>
date Fri, 28 Sep 2007 17:04:52 +0000
parents 1d7d957cfdbd
children a00e9506cb74
files src/newgrf_config.cpp
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/newgrf_config.cpp
+++ b/src/newgrf_config.cpp
@@ -406,6 +406,7 @@
 	}
 
 	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