diff options
author | richiesams | 2013-08-09 14:52:21 -0500 |
---|---|---|
committer | richiesams | 2013-08-09 14:52:21 -0500 |
commit | f89120310cd08dc0640b51ed1e49dd02c3a028b9 (patch) | |
tree | 8a5157e8b81a02b35336e95e124f82d287e55f9d /engines/zvision | |
parent | 0feac806b235867aae4078d2b5c58c38b3b23e21 (diff) | |
download | scummvm-rg350-f89120310cd08dc0640b51ed1e49dd02c3a028b9.tar.gz scummvm-rg350-f89120310cd08dc0640b51ed1e49dd02c3a028b9.tar.bz2 scummvm-rg350-f89120310cd08dc0640b51ed1e49dd02c3a028b9.zip |
ZVISION: Test for file.open before trying to read
Diffstat (limited to 'engines/zvision')
-rw-r--r-- | engines/zvision/utility.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/engines/zvision/utility.cpp b/engines/zvision/utility.cpp index 2e1ade663a..fb4fe22ff8 100644 --- a/engines/zvision/utility.cpp +++ b/engines/zvision/utility.cpp @@ -33,7 +33,10 @@ namespace ZVision { void writeFileContentsToFile(const Common::String &sourceFile, const Common::String &destFile) { Common::File f; - f.open(sourceFile); + if (!f.open(sourceFile)) { + return; + } + byte* buffer = new byte[f.size()]; f.read(buffer, f.size()); |