mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-22 18:32:00 +00:00
Fix bug 281133 - Add Bookmark fails for page without a title. Test to see if we have a page title before adding to the dict.
This commit is contained in:
parent
ee87507218
commit
6562c84def
@ -1899,16 +1899,15 @@ enum BWCOpenDest {
|
||||
NSString* hrefString = nil;
|
||||
[self bookmarkableTitle:&curTitleString URL:&hrefString forWrapper:browserWrapper];
|
||||
|
||||
NSMutableDictionary* itemInfo = [NSMutableDictionary dictionaryWithObjectsAndKeys:
|
||||
curTitleString, kAddBookmarkItemTitleKey,
|
||||
hrefString, kAddBookmarkItemURLKey,
|
||||
nil];
|
||||
NSMutableDictionary* itemInfo = [NSMutableDictionary dictionaryWithObject:hrefString forKey:kAddBookmarkItemURLKey];
|
||||
|
||||
if (browserWrapper == mBrowserView)
|
||||
{
|
||||
[itemInfo setObject:[NSNumber numberWithBool:YES] forKey:kAddBookmarkItemPrimaryTabKey];
|
||||
}
|
||||
// titlel can be nil (e.g. for text files)
|
||||
if (curTitleString)
|
||||
[itemInfo setObject:curTitleString forKey:kAddBookmarkItemTitleKey];
|
||||
|
||||
if (browserWrapper == mBrowserView)
|
||||
[itemInfo setObject:[NSNumber numberWithBool:YES] forKey:kAddBookmarkItemPrimaryTabKey];
|
||||
|
||||
[itemsArray addObject:itemInfo];
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user