aboutsummaryrefslogtreecommitdiff
path: root/engines/scumm/saveload.cpp
diff options
context:
space:
mode:
authorChristoph Mallon2011-08-07 14:35:01 +0200
committerChristoph Mallon2011-08-07 15:19:09 +0200
commite35b4f20c1041b13361aa2ebc4e758873bb1cee3 (patch)
treeb07e8cc3f161fb91f7220d94f24f264cfd13b788 /engines/scumm/saveload.cpp
parentb4b6ce0954f4a636be0b7b88197376b3917af31f (diff)
downloadscummvm-rg350-e35b4f20c1041b13361aa2ebc4e758873bb1cee3.tar.gz
scummvm-rg350-e35b4f20c1041b13361aa2ebc4e758873bb1cee3.tar.bz2
scummvm-rg350-e35b4f20c1041b13361aa2ebc4e758873bb1cee3.zip
GRAPHICS: Simplify the interface of Graphics::loadThumbnail().
Now it returns the Surface, so the caller does not need to create one and pass it.
Diffstat (limited to 'engines/scumm/saveload.cpp')
-rw-r--r--engines/scumm/saveload.cpp7
1 files changed, 1 insertions, 6 deletions
diff --git a/engines/scumm/saveload.cpp b/engines/scumm/saveload.cpp
index 3cc710c207..870ec8cdf7 100644
--- a/engines/scumm/saveload.cpp
+++ b/engines/scumm/saveload.cpp
@@ -686,12 +686,7 @@ Graphics::Surface *ScummEngine::loadThumbnailFromSlot(const char *target, int sl
Graphics::Surface *thumb = 0;
if (Graphics::checkThumbnailHeader(*in)) {
- thumb = new Graphics::Surface();
- assert(thumb);
- if (!Graphics::loadThumbnail(*in, *thumb)) {
- delete thumb;
- thumb = 0;
- }
+ thumb = Graphics::loadThumbnail(*in);
}
delete in;