[Scummvm-git-logs] scummvm master -> 75587c3c669d371601a9c508aad27191e9a9aacd

sev- sev at scummvm.org
Wed Jul 25 10:15:37 CEST 2018


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
75587c3c66 LAB: Fix thumbnail issues


Commit: 75587c3c669d371601a9c508aad27191e9a9aacd
    https://github.com/scummvm/scummvm/commit/75587c3c669d371601a9c508aad27191e9a9aacd
Author: David Fioramonti (dafioram at gmail.com)
Date: 2018-07-25T10:15:32+02:00

Commit Message:
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.

Changed paths:
    engines/lab/lab.h
    engines/lab/savegame.cpp


diff --git a/engines/lab/lab.h b/engines/lab/lab.h
index aedf018..3eba78b 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 46ef148..11986dc 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();





More information about the Scummvm-git-logs mailing list