From f03ae8addbfd9ad1236be3210c869c416d32fca4 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Fri, 3 Dec 2004 10:36:30 +0000 Subject: Paranoia svn-id: r15973 --- backends/sdl/graphics.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'backends/sdl') 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; -- cgit v1.2.3