Commit 348cf3ee281a90739949aee6df0a5afe838f9456

Sam Lantinga 2014-10-15T09:11:15

Fixed spurious SDL error on shutdown if mouse capture isn't supported

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
diff --git a/src/events/SDL_mouse.c b/src/events/SDL_mouse.c
index 8ee262f..21fb877 100644
--- a/src/events/SDL_mouse.c
+++ b/src/events/SDL_mouse.c
@@ -430,7 +430,9 @@ SDL_MouseQuit(void)
     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);