[Scummvm-cvs-logs] CVS: scummvm/scumm/smush smush_player.cpp,1.144,1.145
Max Horn
fingolfin at users.sourceforge.net
Sun Jan 16 05:35:26 CET 2005
Update of /cvsroot/scummvm/scummvm/scumm/smush
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7856
Modified Files:
smush_player.cpp
Log Message:
Fix for bug #1098872 (FTDEMO: Memoryleak in SMUSH player)
Index: smush_player.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/smush/smush_player.cpp,v
retrieving revision 1.144
retrieving revision 1.145
diff -u -d -r1.144 -r1.145
--- smush_player.cpp 16 Jan 2005 13:32:48 -0000 1.144
+++ smush_player.cpp 16 Jan 2005 13:34:43 -0000 1.145
@@ -748,7 +748,9 @@
int height = READ_LE_UINT16(ptr); ptr += 2;
if ((height == 242) && (width == 384)) {
- _dst = _specialBuffer = (byte *)malloc(242 * 384);
+ if (_specialBuffer == 0)
+ _specialBuffer = (byte *)malloc(242 * 384);
+ _dst = _specialBuffer;
} else if ((height > _vm->_screenHeight) || (width > _vm->_screenWidth))
return;
// FT Insane uses smaller frames to draw overlays with moving objects
@@ -812,7 +814,9 @@
int height = b.getWord();
if ((height == 242) && (width == 384)) {
- _dst = _specialBuffer = (byte *)malloc(242 * 384);
+ if (_specialBuffer == 0)
+ _specialBuffer = (byte *)malloc(242 * 384);
+ _dst = _specialBuffer;
} else if ((height > _vm->_screenHeight) || (width > _vm->_screenWidth))
return;
// FT Insane uses smaller frames to draw overlays with moving objects
More information about the Scummvm-git-logs
mailing list