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)
This commit is contained in:
Matthias Clasen
2002-02-09 22:12:04 +00:00
parent 1e40b8cb18
commit dc46b476e3
10 changed files with 155 additions and 12 deletions

View File

@ -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);