1
0
Fork 0

Fix crash on Mac OS X when FG does not finish input init

This commit is contained in:
Szymon Acedański 2017-02-25 14:42:40 +01:00
parent f71c20600a
commit d401a50e0a

View file

@ -229,9 +229,11 @@ void FGMacOSXEventInput::shutdown()
{ {
FGEventInput::shutdown(); FGEventInput::shutdown();
IOHIDManagerClose(d->hidManager, kIOHIDOptionsTypeNone); if (d->hidManager) {
IOHIDManagerUnscheduleFromRunLoop(d->hidManager, CFRunLoopGetCurrent(), kCFRunLoopDefaultMode); IOHIDManagerClose(d->hidManager, kIOHIDOptionsTypeNone);
CFRelease(d->hidManager); IOHIDManagerUnscheduleFromRunLoop(d->hidManager, CFRunLoopGetCurrent(), kCFRunLoopDefaultMode);
CFRelease(d->hidManager);
}
} }
// //