diff options
author | rubidium <rubidium@openttd.org> | 2011-09-09 17:46:21 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2011-09-09 17:46:21 +0000 |
commit | d78a4850a6c480a486fec7341dac3212166ec65c (patch) | |
tree | 72252d6b633331e6d3ead3e9f4f8390277a44cb7 /src | |
parent | b27715dd2183e04bb06cbbfadaf171a405ccb110 (diff) | |
download | openttd-d78a4850a6c480a486fec7341dac3212166ec65c.tar.xz |
(svn r22912) -Fix [FS#4753]: another attempt at fixing a related crash (can't reproduce it though)
Diffstat (limited to 'src')
-rw-r--r-- | src/ai/ai_scanner.cpp | 4 |
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; |