diff options
author | Marisa-Chan | 2014-12-19 17:19:12 +0600 |
---|---|---|
committer | Marisa-Chan | 2014-12-19 17:19:12 +0600 |
commit | 5fb33ee5e7c99f76ba9560b56177041d19fb602e (patch) | |
tree | 6cafed74e960875475ad1d4a9a8b1805636f023a /engines/zvision/scripting/controls/save_control.cpp | |
parent | 79f75059de9ef2530f8d1c043d97dafe8b8ffec8 (diff) | |
download | scummvm-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.cpp | 7 |
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; } } } |