aboutsummaryrefslogtreecommitdiff
path: root/libdbusmenu-glib/client.c
diff options
context:
space:
mode:
Diffstat (limited to 'libdbusmenu-glib/client.c')
-rw-r--r--libdbusmenu-glib/client.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/libdbusmenu-glib/client.c b/libdbusmenu-glib/client.c
index 309a11c..fb2a2bc 100644
--- a/libdbusmenu-glib/client.c
+++ b/libdbusmenu-glib/client.c
@@ -337,7 +337,12 @@ id_prop_update (DBusGProxy * proxy, gint id, gchar * property, GValue * value, D
g_return_if_fail(priv->root != NULL);
DbusmenuMenuitem * menuitem = dbusmenu_menuitem_find_id(priv->root, id);
- g_return_if_fail(menuitem != NULL);
+ if (menuitem == NULL) {
+ #ifdef MASSIVEDEBUGGING
+ g_debug("Property update '%s' on id %d which couldn't be found", property, id);
+ #endif
+ return;
+ }
dbusmenu_menuitem_property_set_value(menuitem, property, value);
@@ -444,6 +449,9 @@ proxy_destroyed (GObject * gobj_proxy, gpointer userdata)
priv->layoutcall = NULL;
}
+ priv->current_revision = 0;
+ priv->my_revision = 0;
+
build_dbus_proxy(DBUSMENU_CLIENT(userdata));
return;
}
@@ -794,13 +802,17 @@ parse_layout (DbusmenuClient * client, const gchar * layout)
clean up that old root */
if (oldroot != NULL) {
dbusmenu_menuitem_set_root(oldroot, FALSE);
- g_object_unref(oldroot);
}
/* If the root changed we can signal that */
g_signal_emit(G_OBJECT(client), signals[ROOT_CHANGED], 0, priv->root, TRUE);
}
+ /* We need to unref it in this function no matter */
+ if (oldroot != NULL) {
+ g_object_unref(oldroot);
+ }
+
return 1;
}