diff --git a/gtk/gtkmenushell.c b/gtk/gtkmenushell.c index d063d0e92d..0e815562f4 100644 --- a/gtk/gtkmenushell.c +++ b/gtk/gtkmenushell.c @@ -587,18 +587,18 @@ static gint gtk_menu_shell_is_item (GtkMenuShell *menu_shell, GtkWidget *child) { - GtkMenuShell *parent; + GtkWidget *parent; g_return_val_if_fail (menu_shell != NULL, FALSE); g_return_val_if_fail (GTK_IS_MENU_SHELL (menu_shell), FALSE); g_return_val_if_fail (child != NULL, FALSE); - parent = GTK_MENU_SHELL (child->parent); + parent = child->parent; while (parent && GTK_IS_MENU_SHELL (parent)) { - if (parent == menu_shell) + if (parent == (GtkWidget*) menu_shell) return TRUE; - parent = GTK_MENU_SHELL (parent->parent_menu_shell); + parent = GTK_MENU_SHELL (parent)->parent_menu_shell; } return FALSE; diff --git a/gtk/gtkobject.c b/gtk/gtkobject.c index be39dfed54..95aa57302c 100644 --- a/gtk/gtkobject.c +++ b/gtk/gtkobject.c @@ -1210,7 +1210,7 @@ gpointer gtk_object_get_user_data (GtkObject *object) { if (user_data_key_id) - gtk_object_get_data_by_id (object, user_data_key_id); + return gtk_object_get_data_by_id (object, user_data_key_id); return NULL; }