diff options
Diffstat (limited to 'src/libsystemd-bus/bus-objects.c')
-rw-r--r-- | src/libsystemd-bus/bus-objects.c | 7 |
1 files changed, 3 insertions, 4 deletions
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: |