diff --git a/engines/zvision/image.cpp b/engines/zvision/image.cpp index cacfec302c42..c4823813dcf5 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);