summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2007-09-28 17:04:52 +0000
committerrubidium <rubidium@openttd.org>2007-09-28 17:04:52 +0000
commit5d17b29a17999bc446093e7c46449856f0290516 (patch)
tree0c5d23ca47ea7f8af0f924e41b0b1bc912948be2
parentab886349ab26ec4e7bb6dfcbbda741105e1976d4 (diff)
downloadopenttd-5d17b29a17999bc446093e7c46449856f0290516.tar.xz
(svn r11180) -Fix (r11175): crash on load when you don't have any NewGRFs. More interesting is: who plays without them ;)
-rw-r--r--src/newgrf_config.cpp1
1 files changed, 1 insertions, 0 deletions
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