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:
smfr%smfr.org 2005-02-15 06:18:36 +00:00
Родитель ba0e95d41a
Коммит 1d28e9d8ef
1 изменённых файлов: 2 добавлений и 1 удалений

Просмотреть файл

@ -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];