diff options
author | Einar Johan Trøan Sømåen | 2012-07-26 19:24:04 +0200 |
---|---|---|
committer | Einar Johan Trøan Sømåen | 2012-07-26 19:24:04 +0200 |
commit | 91edc76b3e98a3b94ca67c17bdc740f272572759 (patch) | |
tree | 5bc1119ff5a1edfeeeb2ddd5f569fe25b3311a6d /engines/wintermute/base | |
parent | 5e325a5b285e03f9099fa6b81c2f6a85fabe4b06 (diff) | |
download | scummvm-rg350-91edc76b3e98a3b94ca67c17bdc740f272572759.tar.gz scummvm-rg350-91edc76b3e98a3b94ca67c17bdc740f272572759.tar.bz2 scummvm-rg350-91edc76b3e98a3b94ca67c17bdc740f272572759.zip |
WINTERMUTE: Avoid crashing when a file doesn't exist in a DCP.
Diffstat (limited to 'engines/wintermute/base')
-rw-r--r-- | engines/wintermute/base/base_file_manager.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/engines/wintermute/base/base_file_manager.cpp b/engines/wintermute/base/base_file_manager.cpp index ff693e055c..94f561997e 100644 --- a/engines/wintermute/base/base_file_manager.cpp +++ b/engines/wintermute/base/base_file_manager.cpp @@ -259,6 +259,9 @@ Common::SeekableReadStream *BaseFileManager::openPkgFile(const Common::String &f }
}
Common::ArchiveMemberPtr entry = _packages.getMember(upcName);
+ if (!entry) {
+ return NULL;
+ }
file = entry->createReadStream();
return file;
}
|