summaryrefslogtreecommitdiffstats
path: root/gdbus
diff options
context:
space:
mode:
Diffstat (limited to 'gdbus')
-rw-r--r--gdbus/object.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/gdbus/object.c b/gdbus/object.c
index c63a26d2..444728c7 100644
--- a/gdbus/object.c
+++ b/gdbus/object.c
@@ -657,6 +657,17 @@ static gboolean remove_interface(struct generic_data *data, const char *name)
return TRUE;
}
+ /*
+ * Interface being removed was just added, on the same mainloop
+ * iteration? Don't send any signal
+ */
+ if (g_slist_find(data->added, iface)) {
+ data->added = g_slist_remove(data->added, iface);
+ g_free(iface->name);
+ g_free(iface);
+ return TRUE;
+ }
+
data->removed = g_slist_prepend(data->removed, iface->name);
g_free(iface);