summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--osdep/macosx_application.m11
1 files changed, 7 insertions, 4 deletions
diff --git a/osdep/macosx_application.m b/osdep/macosx_application.m
index fb3d742ed8..52dacb098a 100644
--- a/osdep/macosx_application.m
+++ b/osdep/macosx_application.m
@@ -135,7 +135,8 @@ static void terminate_cocoa_application(void)
- (void)processEvent:(struct mpv_event *)event
{
#if HAVE_MACOS_TOUCHBAR
- [(TouchBar *)self.touchBar processEvent:event];
+ if ([self respondsToSelector:@selector(touchBar)])
+ [(TouchBar *)self.touchBar processEvent:event];
#endif
}
@@ -179,9 +180,11 @@ static void terminate_cocoa_application(void)
_R(menu, @"Zoom", @"z", MPM_ZOOM)
#if HAVE_MACOS_TOUCHBAR
- [menu addItem:[NSMenuItem separatorItem]];
- [self menuItemWithParent:menu title:@"Customize Touch Bar…"
- action:@selector(toggleTouchBarMenu) keyEquivalent: @""];
+ if ([self respondsToSelector:@selector(touchBar)]) {
+ [menu addItem:[NSMenuItem separatorItem]];
+ [self menuItemWithParent:menu title:@"Customize Touch Bar…"
+ action:@selector(toggleTouchBarMenu) keyEquivalent: @""];
+ }
#endif
return [menu autorelease];