aboutsummaryrefslogtreecommitdiff
path: root/engines/zvision/scripting/controls/save_control.cpp
diff options
context:
space:
mode:
authorMarisa-Chan2014-12-19 17:19:12 +0600
committerMarisa-Chan2014-12-19 17:19:12 +0600
commit5fb33ee5e7c99f76ba9560b56177041d19fb602e (patch)
tree6cafed74e960875475ad1d4a9a8b1805636f023a /engines/zvision/scripting/controls/save_control.cpp
parent79f75059de9ef2530f8d1c043d97dafe8b8ffec8 (diff)
downloadscummvm-rg350-5fb33ee5e7c99f76ba9560b56177041d19fb602e.tar.gz
scummvm-rg350-5fb33ee5e7c99f76ba9560b56177041d19fb602e.tar.bz2
scummvm-rg350-5fb33ee5e7c99f76ba9560b56177041d19fb602e.zip
ZVISION: Fix unchecked return value (CID 1257098)
Diffstat (limited to 'engines/zvision/scripting/controls/save_control.cpp')
-rw-r--r--engines/zvision/scripting/controls/save_control.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/engines/zvision/scripting/controls/save_control.cpp b/engines/zvision/scripting/controls/save_control.cpp
index e27faa50b6..b35611feca 100644
--- a/engines/zvision/scripting/controls/save_control.cpp
+++ b/engines/zvision/scripting/controls/save_control.cpp
@@ -77,10 +77,11 @@ SaveControl::SaveControl(ZVision *engine, uint32 key, Common::SeekableReadStream
Common::SeekableReadStream *save = _engine->getSaveManager()->getSlotFile(iter->saveId);
if (save) {
SaveGameHeader header;
- _engine->getSaveManager()->readSaveGameHeader(save, header);
+ if (_engine->getSaveManager()->readSaveGameHeader(save, header)) {
+ inp->setText(header.saveName);
+ iter->exist = true;
+ }
delete save;
- inp->setText(header.saveName);
- iter->exist = true;
}
}
}