summaryrefslogtreecommitdiff
path: root/src/ai
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2011-09-09 17:46:21 +0000
committerrubidium <rubidium@openttd.org>2011-09-09 17:46:21 +0000
commitd78a4850a6c480a486fec7341dac3212166ec65c (patch)
tree72252d6b633331e6d3ead3e9f4f8390277a44cb7 /src/ai
parentb27715dd2183e04bb06cbbfadaf171a405ccb110 (diff)
downloadopenttd-d78a4850a6c480a486fec7341dac3212166ec65c.tar.xz
(svn r22912) -Fix [FS#4753]: another attempt at fixing a related crash (can't reproduce it though)
Diffstat (limited to 'src/ai')
-rw-r--r--src/ai/ai_scanner.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ai/ai_scanner.cpp b/src/ai/ai_scanner.cpp
index 8b30e8c9f..df989630f 100644
--- a/src/ai/ai_scanner.cpp
+++ b/src/ai/ai_scanner.cpp
@@ -424,8 +424,8 @@ static bool IsSameAI(const ContentInfo *ci, bool md5sum, AIFileInfo *info)
AIFileChecksumCreator checksum;
const char *tar_filename = info->GetTarFile();
- TarList::iterator iter = _tar_list.find(tar_filename);
- if (iter != _tar_list.end()) {
+ TarList::iterator iter;
+ if (tar_filename != NULL && (iter = _tar_list.find(tar_filename)) != _tar_list.end()) {
/* The main script is in a tar file, so find all files that
* are in the same tar and add them to the MD5 checksumming. */
TarFileList::iterator tar;