chiark / gitweb /
unit: properly update references to units which are merged
[elogind.git] / src / dbus-timer.c
index abcbe6f9bed3e7308e8fa6fde29e6521d94454b7..07d425e20e9200926a3a421dc193ed8009243b39 100644 (file)
@@ -107,7 +107,7 @@ static int bus_timer_append_unit(DBusMessageIter *i, const char *property, void
         assert(property);
         assert(u);
 
-        t = u->timer.unit ? u->timer.unit->meta.id : "";
+        t = UNIT_DEREF(u->timer.unit) ? UNIT_DEREF(u->timer.unit)->meta.id : "";
 
         return dbus_message_iter_append_basic(i, DBUS_TYPE_STRING, &t) ? 0 : -ENOMEM;
 }