Fix a crash on triggering bookmark menu directions by the arrow keys.

Nothing to show in 'Other Bookmarks' when the folder is empty and not
visible in the bookmarks bar. So, prevent moving selection to the
hidden 'Other Bookmarks' folder to avoid a crash.

BUG=275284

Review URL: https://chromiumcodereview.appspot.com/22887030

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@221813 0039d316-1c4b-4281-b951-d872f2087c98
parent 1371a26a
...@@ -419,7 +419,9 @@ void BookmarkBarGtk::PopupForButtonNextTo(GtkWidget* button, ...@@ -419,7 +419,9 @@ void BookmarkBarGtk::PopupForButtonNextTo(GtkWidget* button,
const int first_hidden = GetFirstHiddenBookmark(0, &folder_list); const int first_hidden = GetFirstHiddenBookmark(0, &folder_list);
if (first_hidden != -1) if (first_hidden != -1)
folder_list.push_back(overflow_button_); folder_list.push_back(overflow_button_);
folder_list.push_back(other_bookmarks_button_);
if (!model_->other_node()->empty())
folder_list.push_back(other_bookmarks_button_);
// Find the position of |button|. // Find the position of |button|.
int button_idx = -1; int button_idx = -1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment