aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorrichiesams2013-07-17 15:45:09 -0500
committerrichiesams2013-08-04 13:32:27 -0500
commitb316df9e821a7cb27290e8ebed49eb78c2ee5884 (patch)
tree879a6adc6031ca11a290feba68abba9f8f75279e /engines
parent47161ef30d8d7350a92fe28a031437abb338732c (diff)
downloadscummvm-rg350-b316df9e821a7cb27290e8ebed49eb78c2ee5884.tar.gz
scummvm-rg350-b316df9e821a7cb27290e8ebed49eb78c2ee5884.tar.bz2
scummvm-rg350-b316df9e821a7cb27290e8ebed49eb78c2ee5884.zip
ZVISION: Add a return statement for when image load fails
Diffstat (limited to 'engines')
-rw-r--r--engines/zvision/image.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/engines/zvision/image.cpp b/engines/zvision/image.cpp
index cacfec302c..c4823813dc 100644
--- a/engines/zvision/image.cpp
+++ b/engines/zvision/image.cpp
@@ -63,9 +63,10 @@ void ZVision::renderImageToScreen(const Common::String &fileName, uint32 x, uint
// Decode
Graphics::TGADecoder tga;
- if (!tga.loadStream(file))
+ if (!tga.loadStream(file)) {
error("Error while reading TGA image");
- file.close();
+ return;
+ }
const Graphics::Surface *tgaSurface = tga.getSurface();
_system->copyRectToScreen(tgaSurface->pixels, tgaSurface->pitch, x, y, tgaSurface->w, tgaSurface->h);