summaryrefslogtreecommitdiff
path: root/src/nm-dbus-object.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nm-dbus-object.c')
-rw-r--r--src/nm-dbus-object.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/nm-dbus-object.c b/src/nm-dbus-object.c
index f49610ab91..4bae02e44d 100644
--- a/src/nm-dbus-object.c
+++ b/src/nm-dbus-object.c
@@ -183,23 +183,25 @@ nm_dbus_object_unexport_on_idle(gpointer /* (NMDBusObject *) */ self_take)
/*****************************************************************************/
-void
+gboolean
_nm_dbus_object_clear_and_unexport(NMDBusObject **location)
{
NMDBusObject *self;
- g_return_if_fail(location);
+ g_return_val_if_fail(location, FALSE);
+
if (!*location)
- return;
+ return FALSE;
self = g_steal_pointer(location);
- g_return_if_fail(NM_IS_DBUS_OBJECT(self));
+ g_return_val_if_fail(NM_IS_DBUS_OBJECT(self), FALSE);
if (self->internal.path)
nm_dbus_object_unexport(self);
g_object_unref(self);
+ return TRUE;
}
/*****************************************************************************/