mirror of
https://github.com/mpv-player/mpv.git
synced 2026-10-27 22:06:58 +08:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user