diff options
author | Torbjörn Andersson | 2004-10-13 06:36:29 +0000 |
---|---|---|
committer | Torbjörn Andersson | 2004-10-13 06:36:29 +0000 |
commit | 6a1c315fdf60f700b3f49f62a714baf7b2b8ea08 (patch) | |
tree | 26729a9e24e19ef5d7ce3c92766d8e9e77046a33 /backends/sdl | |
parent | 79ef36cf0e3cbd5e154bdd4e2ad7f7deaf1c61d5 (diff) | |
download | scummvm-rg350-6a1c315fdf60f700b3f49f62a714baf7b2b8ea08.tar.gz scummvm-rg350-6a1c315fdf60f700b3f49f62a714baf7b2b8ea08.tar.bz2 scummvm-rg350-6a1c315fdf60f700b3f49f62a714baf7b2b8ea08.zip |
Don't let undraw_mouse() terminate with the surface still locked. Now I can
finally quit Broken Sword II again, without ScummVM crashing.
svn-id: r15536
Diffstat (limited to 'backends/sdl')
-rw-r--r-- | backends/sdl/graphics.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/backends/sdl/graphics.cpp b/backends/sdl/graphics.cpp index af817ddd78..f074f0e34d 100644 --- a/backends/sdl/graphics.cpp +++ b/backends/sdl/graphics.cpp @@ -1013,9 +1013,6 @@ void OSystem_SDL::undraw_mouse() { return; _mouseDrawn = false; - if (SDL_LockSurface(_overlayVisible ? _tmpscreen : _screen) == -1) - error("SDL_LockSurface failed: %s", SDL_GetError()); - int old_mouse_x = _mouseCurState.x - _mouseHotspotX; int old_mouse_y = _mouseCurState.y - _mouseHotspotY; int old_mouse_w = _mouseCurState.w; @@ -1040,6 +1037,8 @@ void OSystem_SDL::undraw_mouse() { if (old_mouse_w <= 0 || old_mouse_h <= 0) return; + if (SDL_LockSurface(_overlayVisible ? _tmpscreen : _screen) == -1) + error("SDL_LockSurface failed: %s", SDL_GetError()); int x, y; if (!_overlayVisible) { |