Use scoped_nsobject to match Chrome implementation

This commit is contained in:
Kevin Sawicki 2017-02-28 16:44:03 -08:00
parent 812beb240b
commit ec500b2852
3 changed files with 30 additions and 23 deletions

View file

@ -383,7 +383,10 @@ bool ScopedDisableResize::disable_resize_ = false;
- (nullable NSTouchBarItem*)touchBar:(NSTouchBar*)touchBar
makeItemForIdentifier:(NSTouchBarItemIdentifier)identifier {
return [atom_touch_bar_ makeItemForIdentifier:identifier];
if (touchBar)
return [atom_touch_bar_ makeItemForIdentifier:identifier];
else
return nil;
}
// NSWindow overrides.