Fix nil tray title crash (#12352)

* Add check for title_ being nil

* remove print stub
This commit is contained in:
Shelley Vohr
2018-03-19 10:49:39 -05:00
committed by GitHub
parent 6b80865bfe
commit 9599615b23

View File

@@ -230,8 +230,13 @@ const CGFloat kVerticalTitleMargin = 2;
return;
}
// check title_ being nil
NSString *title = @"";
if (title_)
title = title_;
attributedTitle_.reset([[NSMutableAttributedString alloc]
initWithString:title_
initWithString:title
attributes:attributes]);
//NSFontAttributeName:[NSFont menuBarFontOfSize:0],