Fixed spurious SDL error on shutdown if mouse capture isn't supported
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);