summaryrefslogtreecommitdiff
path: root/src/libsystemd-bus
diff options
context:
space:
mode:
Diffstat (limited to 'src/libsystemd-bus')
-rw-r--r--src/libsystemd-bus/bus-error.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libsystemd-bus/bus-error.c b/src/libsystemd-bus/bus-error.c
index 35bd4f0daf..c2e41fb016 100644
--- a/src/libsystemd-bus/bus-error.c
+++ b/src/libsystemd-bus/bus-error.c
@@ -285,6 +285,9 @@ _public_ int sd_bus_error_get_errno(const sd_bus_error* e) {
if (!e)
return 0;
+ if (!e->name)
+ return 0;
+
return bus_error_name_to_errno(e->name);
}