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

This commit is contained in:
Sam Lantinga 2014-10-15 09:11:15 -07:00
parent 89127c2d70
commit 348cf3ee28
1 changed files with 3 additions and 1 deletions

View File

@ -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);