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
commit08fd0030d25777b4eb081f6393bd8a123d7b4941 (patch)
tree0c5d23ca47ea7f8af0f924e41b0b1bc912948be2
parent9f552ae0b357c5e222363dc6401a5bad7422e2d2 (diff)
downloadopenttd-08fd0030d25777b4eb081f6393bd8a123d7b4941.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