summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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