diff options
Diffstat (limited to 'engines/kyra/saveload.cpp')
-rw-r--r-- | engines/kyra/saveload.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/engines/kyra/saveload.cpp b/engines/kyra/saveload.cpp index c08967c85c..debf0623ac 100644 --- a/engines/kyra/saveload.cpp +++ b/engines/kyra/saveload.cpp @@ -113,7 +113,10 @@ KyraEngine_v1::kReadSaveHeaderError KyraEngine_v1::readSaveHeader(Common::Seekab if (loadThumbnail) { header.thumbnail = new Graphics::Surface(); assert(header.thumbnail); - Graphics::loadThumbnail(*in, *header.thumbnail); + if (!Graphics::loadThumbnail(*in, *header.thumbnail)) { + delete header.thumbnail; + header.thumbnail = 0; + } } else { Graphics::skipThumbnailHeader(*in); } |