New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GRAPHICS: Set thumbnail to nullptr when loading the thumbnail is skipped #1261

Merged
merged 2 commits into from Aug 3, 2018

Conversation

Projects
None yet
2 participants
@dafioram
Member

dafioram commented Jul 26, 2018

Since Graphics::loadThumbnail can return successfully when a thumbnail is skipped
the caller may want to check to the see that the thumbnail is not null before using
it. Setting it to null is just defensive in case the caller didn't do so.

dafioram added some commits Jul 26, 2018

GRAPHICS: Set thumbnail to nullptr when loading the thumbnail is skipped
Since Graphics::loadThumbnail can return successfully when a thumbnail is skipped
the caller may want to check to the see that the thumbnail is not null before using
it. Setting it to null is just defensive in case the caller didn't do so.

If the user tries to use the thumbnail in setThumbnail then it will just
show a black screen for the thumbnail rather than crashing if they have
not set the thumbnail to null.
LAB: By default skip thumbnail loading for readSaveGameHeader
This changes the convention back to skipping the thumbnail loading
for readSaveGameHeader. querySaveMetaInfos is the only place it
shouldn't be skipped.
@dafioram

This comment has been minimized.

Member

dafioram commented Jul 31, 2018

I've changed the LAB default readSaveGameHeader behavior back to skipping the thumbnail (except for queryMeta) since thats how I think @bonki intended it as a part of 00e59a3.

@sev-

This comment has been minimized.

Member

sev- commented Aug 3, 2018

Thank you, merging.

@sev- sev- merged commit 2649c42 into scummvm:master Aug 3, 2018

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment