aboutsummaryrefslogtreecommitdiff
path: root/backends/sdl
diff options
context:
space:
mode:
authorMax Horn2004-12-03 10:36:30 +0000
committerMax Horn2004-12-03 10:36:30 +0000
commitf03ae8addbfd9ad1236be3210c869c416d32fca4 (patch)
treeb7338f9cca2d280333eaeed56e54d4c80775dc1b /backends/sdl
parent470a83e024ac06edf21ffc7cd979da5f2dde9a8b (diff)
downloadscummvm-rg350-f03ae8addbfd9ad1236be3210c869c416d32fca4.tar.gz
scummvm-rg350-f03ae8addbfd9ad1236be3210c869c416d32fca4.tar.bz2
scummvm-rg350-f03ae8addbfd9ad1236be3210c869c416d32fca4.zip
Paranoia
svn-id: r15973
Diffstat (limited to 'backends/sdl')
-rw-r--r--backends/sdl/graphics.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/backends/sdl/graphics.cpp b/backends/sdl/graphics.cpp
index adc8e0a9ee..a8f5f47360 100644
--- a/backends/sdl/graphics.cpp
+++ b/backends/sdl/graphics.cpp
@@ -1062,13 +1062,15 @@ void OSystem_SDL::drawMouse() {
if (_mouseDrawn || !_mouseVisible)
return;
+ assert(_mouseData);
+
int x = _mouseCurState.x - _mouseHotspotX;
int y = _mouseCurState.y - _mouseHotspotY;
int w = _mouseCurState.w;
int h = _mouseCurState.h;
byte color;
const byte *src = _mouseData; // Image representing the mouse
-
+
// clip the mouse rect, and addjust the src pointer accordingly
if (x < 0) {
w += x;