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();
|
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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|
Loading…
Reference in a new issue