mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-11 01:57:00 +00:00
Fix bug 281133: if adding a page with no title to bookmarks, the Add Bookmarks dialog would never show up because we threw an exception trying to set a text field with a nil string. Now, use the url if the title is empty.
This commit is contained in:
parent
ba0e95d41a
commit
1d28e9d8ef
@ -417,7 +417,8 @@ static const int kDisabledQuicksearchPopupItemTag = 9999;
|
||||
NSTextField* textField = [mBrowserWindowController getAddBookmarkTitle];
|
||||
NSString* bookmarkTitle = titleString;
|
||||
NSString* cleanedTitle = [bookmarkTitle stringByReplacingCharactersInSet:[NSCharacterSet controlCharacterSet] withString:@" "];
|
||||
|
||||
if (!cleanedTitle)
|
||||
cleanedTitle = urlString;
|
||||
[textField setStringValue: cleanedTitle];
|
||||
|
||||
[mBrowserWindowController cacheBookmarkVC: self];
|
||||
|
Loading…
x
Reference in New Issue
Block a user