mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-30 05:34:00 +00:00
ZVISION: Test for file.open before trying to read
This commit is contained in:
parent
0feac806b2
commit
f89120310c
@ -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());
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user