diff --git a/library/secret-collection.c b/library/secret-collection.c index d088d5b..da5cade 100644 --- a/library/secret-collection.c +++ b/library/secret-collection.c @@ -507,8 +507,10 @@ secret_collection_signal (GDBusProxy *proxy, g_mutex_unlock (&self->pv->mutex); - secret_item_refresh (item); - g_object_unref (item); + if (item) { + secret_item_refresh (item); + g_object_unref (item); + } } g_variant_unref (paths); diff --git a/library/secret-service.c b/library/secret-service.c index 971c940..9b82f3b 100644 --- a/library/secret-service.c +++ b/library/secret-service.c @@ -403,8 +403,10 @@ secret_service_signal (GDBusProxy *proxy, g_mutex_unlock (&self->pv->mutex); - secret_collection_refresh (collection); - g_object_unref (collection); + if (collection) { + secret_collection_refresh (collection); + g_object_unref (collection); + } } g_variant_unref (paths);