Fix crash on Mac OS X when FG does not finish input init
This commit is contained in:
parent
f71c20600a
commit
d401a50e0a
1 changed files with 5 additions and 3 deletions
|
@ -229,9 +229,11 @@ void FGMacOSXEventInput::shutdown()
|
|||
{
|
||||
FGEventInput::shutdown();
|
||||
|
||||
IOHIDManagerClose(d->hidManager, kIOHIDOptionsTypeNone);
|
||||
IOHIDManagerUnscheduleFromRunLoop(d->hidManager, CFRunLoopGetCurrent(), kCFRunLoopDefaultMode);
|
||||
CFRelease(d->hidManager);
|
||||
if (d->hidManager) {
|
||||
IOHIDManagerClose(d->hidManager, kIOHIDOptionsTypeNone);
|
||||
IOHIDManagerUnscheduleFromRunLoop(d->hidManager, CFRunLoopGetCurrent(), kCFRunLoopDefaultMode);
|
||||
CFRelease(d->hidManager);
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
|
|
Loading…
Reference in a new issue