Ensure that the touchbar's esape item can be set before setting it

This commit is contained in:
Samuel Attard 2017-10-10 02:24:49 +11:00
parent c85b159d46
commit d350134c4f

View file

@ -143,6 +143,7 @@ static NSString* const ImageScrubberItemIdentifier = @"scrubber.image.item";
}
- (void)setEscapeTouchBarItem:(const mate::PersistentDictionary&)item forTouchBar:(NSTouchBar*)touchBar {
if (![touchBar respondsToSelector:@selector(escapeKeyReplacementItemIdentifier)]) return;
std::string type;
std::string item_id;
NSTouchBarItemIdentifier identifier = nil;