osx: add NULL check for input context in a missing case

Fixes a crash on exit under certain circumstances.
This commit is contained in:
wm4 2015-06-01 19:36:20 +02:00
parent ebc5237c36
commit ed805e16fc
1 changed files with 2 additions and 1 deletions

View File

@ -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];
}