(svn r11180) -Fix (r11175): crash on load when you don't have any NewGRFs. More interesting is: who plays without them ;)
authorrubidium
Fri, 28 Sep 2007 17:04:52 +0000
changeset 7649 c4e93cf27732
parent 7648 c3f25e9f71e4
child 7650 780f1f477317
(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
--- a/src/newgrf_config.cpp	Fri Sep 28 16:05:40 2007 +0000
+++ b/src/newgrf_config.cpp	Fri Sep 28 17:04:52 2007 +0000
@@ -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