From 04caddb7c84a9a8fd4a454766405830233d6c413 Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Sun, 1 Sep 2013 23:49:25 +0200 Subject: cocoa: enqueue events only if input context is present --- osdep/macosx_events.m | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'osdep') diff --git a/osdep/macosx_events.m b/osdep/macosx_events.m index 2edcba57ac..38d723c204 100644 --- a/osdep/macosx_events.m +++ b/osdep/macosx_events.m @@ -159,7 +159,8 @@ void cocoa_uninit_media_keys(void) { void cocoa_put_key(int keycode) { - mp_input_put_key(mpv_shared_app().inputContext, keycode); + if (mpv_shared_app().inputContext) + mp_input_put_key(mpv_shared_app().inputContext, keycode); } void cocoa_put_key_with_modifiers(int keycode, int modifiers) -- cgit v1.2.3