Fixed spurious SDL error on shutdown if mouse capture isn't supported
authorSam Lantinga <slouken@libsdl.org>
Wed, 15 Oct 2014 09:11:15 -0700
changeset 9161 6e34073ef024
parent 9160 25a97df364fb
child 9162 69856cdc9da6
Fixed spurious SDL error on shutdown if mouse capture isn't supported
src/events/SDL_mouse.c
--- a/src/events/SDL_mouse.c	Wed Oct 15 09:10:50 2014 -0700
+++ b/src/events/SDL_mouse.c	Wed Oct 15 09:11:15 2014 -0700
@@ -430,7 +430,9 @@
     SDL_Cursor *cursor, *next;
     SDL_Mouse *mouse = SDL_GetMouse();
 
-    SDL_CaptureMouse(SDL_FALSE);
+    if (mouse->CaptureMouse) {
+        SDL_CaptureMouse(SDL_FALSE);
+    }
     SDL_SetRelativeMouseMode(SDL_FALSE);
     SDL_ShowCursor(1);