Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(387)

Unified Diff: chrome/browser/ui/cocoa/bookmarks/bookmark_context_menu_cocoa_controller.mm

Issue 13801018: Mac: Fix BMB commands triggering a standalone window instead of a sheet. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/bookmarks/bookmark_context_menu_cocoa_controller.mm
===================================================================
--- chrome/browser/ui/cocoa/bookmarks/bookmark_context_menu_cocoa_controller.mm (revision 192635)
+++ chrome/browser/ui/cocoa/bookmarks/bookmark_context_menu_cocoa_controller.mm (working copy)
@@ -88,6 +88,12 @@
if (!bookmarkModel || !bookmarkModel->IsLoaded())
return nil;
+ // This may be called before the BMB view has been added to the window. In
+ // that case, simply return nil so that BookmarkContextMenuController doesn't
+ // get created with a nil window.
+ if (![bookmarkBarController_ browserWindow])
+ return nil;
+
if (!node)
node = bookmarkModel->bookmark_bar_node();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698