diff options
author | wm4 <wm4@nowhere> | 2015-06-01 19:36:20 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-06-01 19:36:20 +0200 |
commit | ed805e16fc9c924d943c9b824d1ed5fd88ca27cd (patch) | |
tree | 9de4137abd8107f9b4fe5394319c1cec81a87db0 /osdep/macosx_events.m | |
parent | ebc5237c3600311e19e25c0118b0352012d3e627 (diff) | |
download | mpv-ed805e16fc9c924d943c9b824d1ed5fd88ca27cd.tar.bz2 mpv-ed805e16fc9c924d943c9b824d1ed5fd88ca27cd.tar.xz |
osx: add NULL check for input context in a missing case
Fixes a crash on exit under certain circumstances.
Diffstat (limited to 'osdep/macosx_events.m')
-rw-r--r-- | osdep/macosx_events.m | 3 |
1 files changed, 2 insertions, 1 deletions
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]; } |