summaryrefslogtreecommitdiff
path: root/gtk/gtkmenuitem.c
diff options
context:
space:
mode:
authorMatthias Clasen <matthiasc@src.gnome.org>2002-02-09 22:12:04 +0000
committerMatthias Clasen <matthiasc@src.gnome.org>2002-02-09 22:12:04 +0000
commitdc46b476e38e3cc0461cf97e4d7d16ec59f4cb29 (patch)
tree6735e92a13cd58a17bac0b33d11dba386662dbeb /gtk/gtkmenuitem.c
parent1e40b8cb180ed58629b7a761eb3582bf52895afa (diff)
downloadgtk+-dc46b476e38e3cc0461cf97e4d7d16ec59f4cb29.tar.gz
Avoid segfault for selectable tab labels (even without a segfault, they
* gtk/gtknotebook.c (gtk_notebook_set_focus_child): Avoid segfault for selectable tab labels (even without a segfault, they make the notebook almost unusable, though). (#69985) * gtk/gtkmenuitem.c (gtk_menu_item_set_accel_path): Silently do nothing if the parent is not a menu. (#66492) * gtk/gtkitemfactory.c (gtk_item_factory_from_widget, gtk_item_factory_path_from_widget): Try fetching the return value from menu_item->submenu as a fallback. (#69020)
Diffstat (limited to 'gtk/gtkmenuitem.c')
-rw-r--r--gtk/gtkmenuitem.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gtk/gtkmenuitem.c b/gtk/gtkmenuitem.c
index 06a47ed0ff..6b22ca714b 100644
--- a/gtk/gtkmenuitem.c
+++ b/gtk/gtkmenuitem.c
@@ -1124,7 +1124,7 @@ gtk_menu_item_set_accel_path (GtkMenuItem *menu_item,
gtk_widget_set_accel_path (widget, NULL, NULL);
/* install accelerators associated with new path */
- if (widget->parent)
+ if (widget->parent && GTK_IS_MENU (widget->parent))
{
GtkMenu *menu = GTK_MENU (widget->parent);