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 91616e34073ef024
parent 9160 25a97df364fb
child 9162 69856cdc9da6
Fixed spurious SDL error on shutdown if mouse capture isn't supported
src/events/SDL_mouse.c
     1.1 --- a/src/events/SDL_mouse.c	Wed Oct 15 09:10:50 2014 -0700
     1.2 +++ b/src/events/SDL_mouse.c	Wed Oct 15 09:11:15 2014 -0700
     1.3 @@ -430,7 +430,9 @@
     1.4      SDL_Cursor *cursor, *next;
     1.5      SDL_Mouse *mouse = SDL_GetMouse();
     1.6  
     1.7 -    SDL_CaptureMouse(SDL_FALSE);
     1.8 +    if (mouse->CaptureMouse) {
     1.9 +        SDL_CaptureMouse(SDL_FALSE);
    1.10 +    }
    1.11      SDL_SetRelativeMouseMode(SDL_FALSE);
    1.12      SDL_ShowCursor(1);
    1.13