summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormdm@chromium.org <mdm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-02 00:19:22 +0000
committermdm@chromium.org <mdm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-02 00:19:22 +0000
commit947fe47c56ca3c165d45cb4bc6103c6238566da3 (patch)
tree6eb2a7fd893414cf6315717db368d3ec1cc3d0f8
parentaef623e554e1a83dceb24f903b6f05abab1a1d1c (diff)
downloadchromium_src-947fe47c56ca3c165d45cb4bc6103c6238566da3.zip
chromium_src-947fe47c56ca3c165d45cb4bc6103c6238566da3.tar.gz
chromium_src-947fe47c56ca3c165d45cb4bc6103c6238566da3.tar.bz2
Linux: fix a crash on highlighting native submenus introduced by fixing crashes in dynamic submenus. Submenus are apparently hard.
BUG=153082 Review URL: https://chromiumcodereview.appspot.com/11040007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@159599 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/ui/gtk/menu_gtk.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/chrome/browser/ui/gtk/menu_gtk.cc b/chrome/browser/ui/gtk/menu_gtk.cc
index 2b61d7d..3e8a57d 100644
--- a/chrome/browser/ui/gtk/menu_gtk.cc
+++ b/chrome/browser/ui/gtk/menu_gtk.cc
@@ -604,6 +604,14 @@ void MenuGtk::OnMenuItemActivated(GtkWidget* menu_item) {
ui::MenuModel* model = ModelForMenuItem(GTK_MENU_ITEM(menu_item));
+ if (!model) {
+ // There won't be a model for "native" submenus like the "Input Methods"
+ // context menu. We don't need to handle activation messages for submenus
+ // anyway, so we can just return here.
+ DCHECK(gtk_menu_item_get_submenu(GTK_MENU_ITEM(menu_item)));
+ return;
+ }
+
// The activate signal is sent to radio items as they get deselected;
// ignore it in this case.
if (GTK_IS_RADIO_MENU_ITEM(menu_item) &&