[Scummvm-cvs-logs] CVS: scummvm/graphics animation.cpp,1.15,1.15.2.1
Nicolas Bacca
arisme at users.sourceforge.net
Mon Dec 20 15:26:01 CET 2004
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/scumm/smush smush_player.h,1.37,1.37.2.1 smush_player.cpp,1.138,1.138.2.1
- Next message: [Scummvm-cvs-logs] CVS: scummvm/common/scaler scale2x.cpp,1.3,1.3.2.1 scale3x.cpp,1.2,1.2.2.1 scalebit.cpp,1.5,1.5.2.1
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/scummvm/scummvm/graphics
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24503
Modified Files:
Tag: branch-0-7-0
animation.cpp
Log Message:
CE workaround - skipping the movie is better than crashing if the LUT cannot be allocated
Index: animation.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/graphics/animation.cpp,v
retrieving revision 1.15
retrieving revision 1.15.2.1
diff -u -d -r1.15 -r1.15.2.1
--- animation.cpp 5 Dec 2004 02:55:06 -0000 1.15
+++ animation.cpp 20 Dec 2004 23:25:07 -0000 1.15.2.1
@@ -322,6 +322,11 @@
lookup = (OverlayColor *)calloc((BITDEPTH+1) * (BITDEPTH+1) * 256, sizeof(OverlayColor));
+ if (!lookup) {
+ warning("Not enough memory to allocate LUT - cannot play sequence");
+ return;
+ }
+
int y, cb, cr;
int r, g, b;
int pos = 0;
@@ -348,6 +353,9 @@
void BaseAnimationState::plotYUV(OverlayColor *lut, int width, int height, byte *const *dat) {
+ if (!lut)
+ return;
+
OverlayColor *ptr = overlay + (MOVIE_HEIGHT - height) / 2 * MOVIE_WIDTH + (MOVIE_WIDTH - width) / 2;
int x, y;
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/scumm/smush smush_player.h,1.37,1.37.2.1 smush_player.cpp,1.138,1.138.2.1
- Next message: [Scummvm-cvs-logs] CVS: scummvm/common/scaler scale2x.cpp,1.3,1.3.2.1 scale3x.cpp,1.2,1.2.2.1 scalebit.cpp,1.5,1.5.2.1
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Scummvm-git-logs
mailing list