mac: Don't create button without title, fixes #631
This commit is contained in:
parent
5df1716144
commit
039903c6b2
1 changed files with 3 additions and 0 deletions
|
@ -75,6 +75,9 @@ NSAlert* CreateNSAlert(NativeWindow* parent_window,
|
|||
|
||||
for (size_t i = 0; i < buttons.size(); ++i) {
|
||||
NSString* title = base::SysUTF8ToNSString(buttons[i]);
|
||||
// An empty title causes crash on OS X.
|
||||
if (buttons[i].empty())
|
||||
title = @"(empty)";
|
||||
NSButton* button = [alert addButtonWithTitle:title];
|
||||
[button setTag:i];
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue