summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gtk/gtkmenushell.c8
-rw-r--r--gtk/gtkobject.c2
2 files changed, 5 insertions, 5 deletions
diff --git a/gtk/gtkmenushell.c b/gtk/gtkmenushell.c
index d063d0e92..0e815562f 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 be39dfed5..95aa57302 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;
}