Warn when a sprite operation is to be performed on a nonexistent surface instead of crashing
svn-id: r41499
This commit is contained in:
parent
7eaf013bbf
commit
acb0de6580
1 changed files with 5 additions and 0 deletions
|
@ -705,6 +705,11 @@ void Draw_v2::spriteOperation(int16 operation) {
|
||||||
sourceSurf = _spritesArray[_sourceSurface];
|
sourceSurf = _spritesArray[_sourceSurface];
|
||||||
destSurf = _spritesArray[_destSurface];
|
destSurf = _spritesArray[_destSurface];
|
||||||
|
|
||||||
|
if (!destSurf) {
|
||||||
|
warning("Can't do operation %d on surface %d: nonexistent", operation, _destSurface);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
switch (operation) {
|
switch (operation) {
|
||||||
case DRAW_BLITSURF:
|
case DRAW_BLITSURF:
|
||||||
case DRAW_DRAWLETTER:
|
case DRAW_DRAWLETTER:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue