diff options
author | Max Horn | 2004-12-03 10:36:30 +0000 |
---|---|---|
committer | Max Horn | 2004-12-03 10:36:30 +0000 |
commit | f03ae8addbfd9ad1236be3210c869c416d32fca4 (patch) | |
tree | b7338f9cca2d280333eaeed56e54d4c80775dc1b | |
parent | 470a83e024ac06edf21ffc7cd979da5f2dde9a8b (diff) | |
download | scummvm-rg350-f03ae8addbfd9ad1236be3210c869c416d32fca4.tar.gz scummvm-rg350-f03ae8addbfd9ad1236be3210c869c416d32fca4.tar.bz2 scummvm-rg350-f03ae8addbfd9ad1236be3210c869c416d32fca4.zip |
Paranoia
svn-id: r15973
-rw-r--r-- | backends/sdl/graphics.cpp | 4 |
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; |