mirror of https://github.com/mpv-player/mpv
macosx_events: fix null dereference on uninit
Bug introduced by commit 6fb020f5
. It doesn't always happen, since it is
caused by the playloop and cocoa UI code running in separate threads.
Fixes #398.
This commit is contained in:
parent
8f3d0b5e53
commit
b454cc0ca3
|
@ -176,7 +176,10 @@ void cocoa_put_key_with_modifiers(int keycode, int modifiers)
|
|||
|
||||
- (BOOL)useAltGr
|
||||
{
|
||||
return mp_input_use_alt_gr(mpv_shared_app().inputContext);
|
||||
if (mpv_shared_app().inputContext)
|
||||
return mp_input_use_alt_gr(mpv_shared_app().inputContext);
|
||||
else
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (void)startAppleRemote
|
||||
|
|
Loading…
Reference in New Issue