diff options
Diffstat (limited to 'libdbusmenu-gtk/client.c')
-rw-r--r-- | libdbusmenu-gtk/client.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/libdbusmenu-gtk/client.c b/libdbusmenu-gtk/client.c index 35f5e61..21da38e 100644 --- a/libdbusmenu-gtk/client.c +++ b/libdbusmenu-gtk/client.c @@ -324,14 +324,13 @@ dbusmenu_gtkclient_menuitem_get (DbusmenuGtkClient * client, DbusmenuMenuitem * g_return_val_if_fail(DBUSMENU_IS_GTKCLIENT(client), NULL); g_return_val_if_fail(DBUSMENU_IS_MENUITEM(item), NULL); - GtkMenuItem * mi = GTK_MENU_ITEM(g_object_get_data(G_OBJECT(item), data_menuitem)); - if (mi == NULL) { - // new_menuitem(DBUSMENU_CLIENT(client), item, NULL); + gpointer data = g_object_get_data(G_OBJECT(item), data_menuitem); + if (data == NULL) { g_warning("GTK not updated"); - mi = GTK_MENU_ITEM(g_object_get_data(G_OBJECT(item), data_menuitem)); + return NULL; } - return mi; + return GTK_MENU_ITEM(data); } /* The base type handler that builds a plain ol' |