summaryrefslogtreecommitdiff
path: root/src/dbus-unit.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-07-11 03:59:49 +0200
committerLennart Poettering <lennart@poettering.net>2010-07-11 03:59:59 +0200
commitc0bd0cf7ff0abdc8b51d58fbd7819ec54917be30 (patch)
tree61fa992a396904ca1b0447eb0f64414333ef1705 /src/dbus-unit.c
parent90d473a1c05c692d0beaac3ff939b01f930fcada (diff)
dbus: don't hit an assert if we sent a changed signal for something not in the dbus queue (i.e. because it was deleted before it was fully created
Diffstat (limited to 'src/dbus-unit.c')
-rw-r--r--src/dbus-unit.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/dbus-unit.c b/src/dbus-unit.c
index ad0c193eae..735e5a53f2 100644
--- a/src/dbus-unit.c
+++ b/src/dbus-unit.c
@@ -371,10 +371,11 @@ void bus_unit_send_change_signal(Unit *u) {
DBusMessage *m = NULL;
assert(u);
- assert(u->meta.in_dbus_queue);
- LIST_REMOVE(Meta, dbus_queue, u->meta.manager->dbus_unit_queue, &u->meta);
- u->meta.in_dbus_queue = false;
+ if (u->meta.in_dbus_queue) {
+ LIST_REMOVE(Meta, dbus_queue, u->meta.manager->dbus_unit_queue, &u->meta);
+ u->meta.in_dbus_queue = false;
+ }
if (!bus_has_subscriber(u->meta.manager)) {
u->meta.sent_dbus_new_signal = true;