summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/libsystemd/sd-bus/sd-bus.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libsystemd/sd-bus/sd-bus.c b/src/libsystemd/sd-bus/sd-bus.c
index 118769086e..e494cd2ba9 100644
--- a/src/libsystemd/sd-bus/sd-bus.c
+++ b/src/libsystemd/sd-bus/sd-bus.c
@@ -1365,7 +1365,8 @@ _public_ sd_bus *sd_bus_unref(sd_bus *bus) {
* the messages and thus implicitly also kill our own
* last references */
- bus_reset_queues(bus);
+ if (q)
+ bus_reset_queues(bus);
}
i = REFCNT_DEC(bus->n_ref);