[Scummvm-cvs-logs] SF.net SVN: scummvm:[53333] scummvm/trunk/engines/sword25/gfx/opengl/ glimage.cpp
sev at users.sourceforge.net
sev at users.sourceforge.net
Wed Oct 13 01:42:18 CEST 2010
Revision: 53333
http://scummvm.svn.sourceforge.net/scummvm/?rev=53333&view=rev
Author: sev
Date: 2010-10-12 23:42:18 +0000 (Tue, 12 Oct 2010)
Log Message:
-----------
SWORD25: Added de-allocation of data on image load error
Modified Paths:
--------------
scummvm/trunk/engines/sword25/gfx/opengl/glimage.cpp
Modified: scummvm/trunk/engines/sword25/gfx/opengl/glimage.cpp
===================================================================
--- scummvm/trunk/engines/sword25/gfx/opengl/glimage.cpp 2010-10-12 23:41:57 UTC (rev 53332)
+++ scummvm/trunk/engines/sword25/gfx/opengl/glimage.cpp 2010-10-12 23:42:18 UTC (rev 53333)
@@ -75,12 +75,14 @@
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;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list