diff --git a/gio/gdbusnamewatching.c b/gio/gdbusnamewatching.c
index 12e8ed7..87044d1 100644
--- a/gio/gdbusnamewatching.c
+++ b/gio/gdbusnamewatching.c
@@ -151,19 +151,23 @@ actually_do_call (Client *client, GDBusConnection *connection, const gchar *name
     case CALL_TYPE_NAME_APPEARED:
       if (client->name_appeared_handler != NULL)
         {
+          client_ref (client);
           client->name_appeared_handler (connection,
                                          client->name,
                                          name_owner,
                                          client->user_data);
+          client_unref (client);
         }
       break;
 
     case CALL_TYPE_NAME_VANISHED:
       if (client->name_vanished_handler != NULL)
         {
+          client_ref (client);
           client->name_vanished_handler (connection,
                                          client->name,
                                          client->user_data);
+          client_unref (client);
         }
       break;
 
