[Scummvm-cvs-logs] SF.net SVN: scummvm: [31986] scummvm/trunk/engines/kyra
lordhoto at users.sourceforge.net
lordhoto at users.sourceforge.net
Sat May 10 21:29:13 CEST 2008
Revision: 31986
http://scummvm.svn.sourceforge.net/scummvm/?rev=31986&view=rev
Author: lordhoto
Date: 2008-05-10 12:29:13 -0700 (Sat, 10 May 2008)
Log Message:
-----------
Fixed bug in Screen_v2::makeShapeCopy.
Modified Paths:
--------------
scummvm/trunk/engines/kyra/kyra_v2.cpp
scummvm/trunk/engines/kyra/screen_v2.cpp
Modified: scummvm/trunk/engines/kyra/kyra_v2.cpp
===================================================================
--- scummvm/trunk/engines/kyra/kyra_v2.cpp 2008-05-10 19:20:38 UTC (rev 31985)
+++ scummvm/trunk/engines/kyra/kyra_v2.cpp 2008-05-10 19:29:13 UTC (rev 31986)
@@ -225,14 +225,12 @@
debugC(9, kDebugLevelMain, "KyraEngine_v2::addShapeToPool(%p, %d, %d)", data, realIndex, shape);
remShapeFromPool(realIndex);
_gameShapes[realIndex] = screen_v2()->makeShapeCopy(data, shape);
- assert(_gameShapes[realIndex]);
}
void KyraEngine_v2::addShapeToPool(uint8 *shpData, int index) {
debugC(9, kDebugLevelMain, "KyraEngine_v2::addShapeToPool(%p, %d)", shpData, index);
remShapeFromPool(index);
_gameShapes[index] = shpData;
- assert(_gameShapes[index]);
}
void KyraEngine_v2::remShapeFromPool(int idx) {
Modified: scummvm/trunk/engines/kyra/screen_v2.cpp
===================================================================
--- scummvm/trunk/engines/kyra/screen_v2.cpp 2008-05-10 19:20:38 UTC (rev 31985)
+++ scummvm/trunk/engines/kyra/screen_v2.cpp 2008-05-10 19:29:13 UTC (rev 31986)
@@ -290,6 +290,9 @@
debugC(9, kDebugLevelScreen, "Screen_v2::makeShapeCopy(%p, %d)", (const void *)src, index);
const uint8 *shape = getPtrToShape(src, index);
+ if (!shape)
+ return 0;
+
int size = getShapeSize(shape);
uint8 *copy = new uint8[size];
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