summary refs log tree commit diff
path: root/src/core/nm-dbus-object.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/nm-dbus-object.c')
-rw-r--r--src/core/nm-dbus-object.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/core/nm-dbus-object.c b/src/core/nm-dbus-object.c
index 6f294fe2..04149739 100644
--- a/src/core/nm-dbus-object.c
+++ b/src/core/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;
 }
 
 /*****************************************************************************/