From 348cf3ee281a90739949aee6df0a5afe838f9456 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Wed, 15 Oct 2014 09:11:15 -0700 Subject: [PATCH] Fixed spurious SDL error on shutdown if mouse capture isn't supported --- src/events/SDL_mouse.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/events/SDL_mouse.c b/src/events/SDL_mouse.c index 8ee262f10..21fb87771 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);