Worked around a crash on Mac OS X 10.10 and earlier, thanks to Eric Wasylishen.
authorSam Lantinga <slouken@libsdl.org>
Tue, 18 Oct 2016 23:12:45 -0700
changeset 10552221d4601ab8c
parent 10551 a5bc0d82dca4
child 10553 c1bb718f6c3f
Worked around a crash on Mac OS X 10.10 and earlier, thanks to Eric Wasylishen.
src/video/cocoa/SDL_cocoakeyboard.m
     1.1 --- a/src/video/cocoa/SDL_cocoakeyboard.m	Mon Oct 17 22:09:22 2016 -0700
     1.2 +++ b/src/video/cocoa/SDL_cocoakeyboard.m	Tue Oct 18 23:12:45 2016 -0700
     1.3 @@ -235,7 +235,12 @@
     1.4      IOHIDManagerUnscheduleFromRunLoop(s_hidManager, CFRunLoopGetCurrent(), kCFRunLoopDefaultMode);
     1.5      IOHIDManagerRegisterInputValueCallback(s_hidManager, NULL, NULL);
     1.6      IOHIDManagerClose(s_hidManager, 0);
     1.7 +
     1.8 +#if 0 /* Releasing here causes a crash on Mac OS X 10.10 and earlier,
     1.9 +       * so just leak it for now. See bug 2157 for details.
    1.10 +       */
    1.11      CFRelease(s_hidManager);
    1.12 +#endif
    1.13      s_hidManager = NULL;
    1.14  }
    1.15