diff options
author | David Fioramonti | 2018-07-12 15:43:05 -0700 |
---|---|---|
committer | Eugene Sandulenko | 2018-07-25 10:15:32 +0200 |
commit | 75587c3c669d371601a9c508aad27191e9a9aacd (patch) | |
tree | ed0c0a7c7cd3df1896532e863de8402ab1f6e51b | |
parent | 7b0402fbb0dc9fa5759b7f059ada915d72677e4d (diff) | |
download | scummvm-rg350-75587c3c669d371601a9c508aad27191e9a9aacd.tar.gz scummvm-rg350-75587c3c669d371601a9c508aad27191e9a9aacd.tar.bz2 scummvm-rg350-75587c3c669d371601a9c508aad27191e9a9aacd.zip |
LAB: Fix thumbnail issues
Fixes Trac#10619.
The thumbnail loading for the saved games was defaulting to
disabled so no thumbnail was being loaded and this caused trying
to show the thumbnail to crash scummvm.
So I have set the thumbnail pointer to be null if the thumbnail
doesn't get loaded and I've set the thumnail to not be skipped
so that thumbnails get shown when using the gui.
-rw-r--r-- | engines/lab/lab.h | 2 | ||||
-rw-r--r-- | engines/lab/savegame.cpp | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/engines/lab/lab.h b/engines/lab/lab.h index aedf0181ec..3eba78b42e 100644 --- a/engines/lab/lab.h +++ b/engines/lab/lab.h @@ -502,7 +502,7 @@ private: void handleTrialWarning(); }; -WARN_UNUSED_RESULT bool readSaveGameHeader(Common::InSaveFile *in, SaveGameHeader &header, bool skipThumbnail = true); +WARN_UNUSED_RESULT bool readSaveGameHeader(Common::InSaveFile *in, SaveGameHeader &header, bool skipThumbnail = false); } // End of namespace Lab diff --git a/engines/lab/savegame.cpp b/engines/lab/savegame.cpp index 46ef1486f0..11986dc8c9 100644 --- a/engines/lab/savegame.cpp +++ b/engines/lab/savegame.cpp @@ -98,10 +98,11 @@ WARN_UNUSED_RESULT bool readSaveGameHeader(Common::InSaveFile *in, SaveGameHeade header._descr.setDescription(saveName); // Get the thumbnail - Graphics::Surface *thumbnail; + Graphics::Surface *thumbnail = nullptr; if (!Graphics::loadThumbnail(*in, thumbnail, skipThumbnail)) { return false; } + header._descr.setThumbnail(thumbnail); uint32 saveDate = in->readUint32BE(); |