diff options
author | Sam Lantinga <slouken@libsdl.org> | 2016-10-18 23:12:45 -0700 |
---|---|---|
committer | Sam Lantinga <slouken@libsdl.org> | 2016-10-18 23:12:45 -0700 |
commit | 8bb4e77b9501bd0fca8629315eff479bcedb06a4 (patch) | |
tree | d6add3fbe4fbde98c1c93ae2581911419ae9c2ce | |
parent | d673ba40c42f67bdd96c1593479ce171c4ee694f (diff) | |
download | sdl-8bb4e77b9501bd0fca8629315eff479bcedb06a4.tar.gz |
Worked around a crash on Mac OS X 10.10 and earlier, thanks to Eric Wasylishen.
-rw-r--r-- | src/video/cocoa/SDL_cocoakeyboard.m | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/video/cocoa/SDL_cocoakeyboard.m b/src/video/cocoa/SDL_cocoakeyboard.m index 2ad7bc3f5..91267e51b 100644 --- a/src/video/cocoa/SDL_cocoakeyboard.m +++ b/src/video/cocoa/SDL_cocoakeyboard.m @@ -235,7 +235,12 @@ QuitHIDCallback() IOHIDManagerUnscheduleFromRunLoop(s_hidManager, CFRunLoopGetCurrent(), kCFRunLoopDefaultMode); IOHIDManagerRegisterInputValueCallback(s_hidManager, NULL, NULL); IOHIDManagerClose(s_hidManager, 0); + +#if 0 /* Releasing here causes a crash on Mac OS X 10.10 and earlier, + * so just leak it for now. See bug 2157 for details. + */ CFRelease(s_hidManager); +#endif s_hidManager = NULL; } |