From 28d6633ae11fa0747a4bfa09effe839a91b6d5e4 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Tue, 22 Oct 2013 12:40:54 +0100 Subject: bus: NULL signatures are OK too --- src/libsystemd-bus/bus-objects.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/libsystemd-bus') diff --git a/src/libsystemd-bus/bus-objects.c b/src/libsystemd-bus/bus-objects.c index 90417fdca1..c852ad6c42 100644 --- a/src/libsystemd-bus/bus-objects.c +++ b/src/libsystemd-bus/bus-objects.c @@ -333,14 +333,13 @@ static int invoke_property_get( switch (v->x.property.signature[0]) { case SD_BUS_TYPE_STRING: - p = *(char**) userdata; - if (!p) - p = ""; + case SD_BUS_TYPE_SIGNATURE: + p = strempty(*(char**) userdata); break; case SD_BUS_TYPE_OBJECT_PATH: - case SD_BUS_TYPE_SIGNATURE: p = *(char**) userdata; + assert(p); break; default: -- cgit v1.2.3-54-g00ecf