summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormdm@chromium.org <mdm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-10 01:49:22 +0000
committermdm@chromium.org <mdm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-10 01:49:22 +0000
commit956d5aecbbf21ab3f84c87a8aec7d3a47eefbd34 (patch)
tree69439dc77207c626a4150902a2b11f511164db75
parent3c0c15566438310165868ec3f19cbe8fdc1a3a41 (diff)
downloadchromium_src-956d5aecbbf21ab3f84c87a8aec7d3a47eefbd34.zip
chromium_src-956d5aecbbf21ab3f84c87a8aec7d3a47eefbd34.tar.gz
chromium_src-956d5aecbbf21ab3f84c87a8aec7d3a47eefbd34.tar.bz2
Linux: avoid a NOTREACHED() by not reaching it.
BUG=none TEST=none Review URL: http://codereview.chromium.org/195046 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25832 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/gtk/bookmark_bar_gtk.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/chrome/browser/gtk/bookmark_bar_gtk.cc b/chrome/browser/gtk/bookmark_bar_gtk.cc
index e75b43c..9228adf 100644
--- a/chrome/browser/gtk/bookmark_bar_gtk.cc
+++ b/chrome/browser/gtk/bookmark_bar_gtk.cc
@@ -298,7 +298,8 @@ void BookmarkBarGtk::BookmarkNodeMoved(BookmarkModel* model,
int old_index,
const BookmarkNode* new_parent,
int new_index) {
- BookmarkNodeRemoved(model, old_parent, old_index, NULL);
+ const BookmarkNode* node = new_parent->GetChild(new_index);
+ BookmarkNodeRemoved(model, old_parent, old_index, node);
BookmarkNodeAdded(model, new_parent, new_index);
}
@@ -334,7 +335,8 @@ void BookmarkBarGtk::BookmarkNodeRemoved(BookmarkModel* model,
GtkWidget* to_remove = GTK_WIDGET(gtk_toolbar_get_nth_item(
GTK_TOOLBAR(bookmark_toolbar_.get()), old_index));
- menu_bar_helper_.Remove(gtk_bin_get_child(GTK_BIN(to_remove)));
+ if (node->is_folder())
+ menu_bar_helper_.Remove(gtk_bin_get_child(GTK_BIN(to_remove)));
gtk_container_remove(GTK_CONTAINER(bookmark_toolbar_.get()),
to_remove);