diff options
author | Paul Gilbert | 2010-09-07 23:37:44 +0000 |
---|---|---|
committer | Eugene Sandulenko | 2010-10-12 23:42:18 +0000 |
commit | f5a822c34092b1ea6051943f317760f66e590be7 (patch) | |
tree | f8a08fa3295f702f405113142ce443e2e6aa1949 /engines/sword25 | |
parent | d84400d5074b7c4bf6efe8dc002d75191ff74b67 (diff) | |
download | scummvm-rg350-f5a822c34092b1ea6051943f317760f66e590be7.tar.gz scummvm-rg350-f5a822c34092b1ea6051943f317760f66e590be7.tar.bz2 scummvm-rg350-f5a822c34092b1ea6051943f317760f66e590be7.zip |
SWORD25: Added de-allocation of data on image load error
svn-id: r53333
Diffstat (limited to 'engines/sword25')
-rw-r--r-- | engines/sword25/gfx/opengl/glimage.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/engines/sword25/gfx/opengl/glimage.cpp b/engines/sword25/gfx/opengl/glimage.cpp index d265d0bed8..4402e2fff6 100644 --- a/engines/sword25/gfx/opengl/glimage.cpp +++ b/engines/sword25/gfx/opengl/glimage.cpp @@ -75,12 +75,14 @@ GLImage::GLImage(const Common::String &filename, bool &result) : int pitch; if (!ImageLoader::ExtractImageProperties(pFileData, fileSize, colorFormat, _width, _height)) { BS_LOG_ERRORLN("Could not read image properties."); + delete[] pFileData; return; } // Das Bild dekomprimieren if (!ImageLoader::LoadImage(pFileData, fileSize, GraphicEngine::CF_ARGB32, _data, _width, _height, pitch)) { BS_LOG_ERRORLN("Could not decode image."); + delete[] pFileData; return; } |