[Scummvm-cvs-logs] CVS: scummvm/backends/sdl graphics.cpp,1.31,1.32
Max Horn
fingolfin at users.sourceforge.net
Sat Mar 12 08:33:00 CET 2005
Update of /cvsroot/scummvm/scummvm/backends/sdl
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1852
Modified Files:
graphics.cpp
Log Message:
Add some paranoia checks
Index: graphics.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/sdl/graphics.cpp,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -d -r1.31 -r1.32
--- graphics.cpp 10 Mar 2005 15:59:31 -0000 1.31
+++ graphics.cpp 12 Mar 2005 16:32:32 -0000 1.32
@@ -724,6 +724,7 @@
void OSystem_SDL::copyRectToScreen(const byte *src, int pitch, int x, int y, int w, int h) {
assert (_transactionMode == kTransactionNone);
+ assert(src);
if (_screen == NULL)
return;
@@ -857,6 +858,7 @@
void OSystem_SDL::makeChecksums(const byte *buf) {
+ assert(buf);
uint32 *sums = _dirtyChecksums;
uint x,y;
const uint last_x = (uint)_screenWidth / 8;
@@ -894,6 +896,7 @@
}
void OSystem_SDL::addDirtyRgnAuto(const byte *buf) {
+ assert(buf);
assert(((long)buf & 3) == 0);
/* generate a table of the checksums */
@@ -945,6 +948,7 @@
}
void OSystem_SDL::setPalette(const byte *colors, uint start, uint num) {
+ assert(colors);
const byte *b = colors;
uint i;
SDL_Color *base = _currentPalette + start;
@@ -967,6 +971,7 @@
}
void OSystem_SDL::setCursorPalette(const byte *colors, uint start, uint num) {
+ assert(colors);
const byte *b = colors;
uint i;
SDL_Color *base = _cursorPalette + start;
@@ -1432,6 +1437,7 @@
#ifdef USE_OSD
void OSystem_SDL::displayMessageOnOSD(const char *msg) {
assert (_transactionMode == kTransactionNone);
+ assert(msg);
uint i;
More information about the Scummvm-git-logs
mailing list