From ed805e16fc9c924d943c9b824d1ed5fd88ca27cd Mon Sep 17 00:00:00 2001 From: wm4 Date: Mon, 1 Jun 2015 19:36:20 +0200 Subject: osx: add NULL check for input context in a missing case Fixes a crash on exit under certain circumstances. --- 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 9c8d533ec0..435e84c787 100644 --- a/osdep/macosx_events.m +++ b/osdep/macosx_events.m @@ -247,7 +247,8 @@ void cocoa_set_input_context(struct input_ctx *input_context) - (void)wakeup { [_input_lock lock]; - mp_input_wakeup(_inputContext); + if (_inputContext) + mp_input_wakeup(_inputContext); [_input_lock unlock]; } -- cgit v1.2.3