From 2f99c30143daf813c923a496188310b55912361e Mon Sep 17 00:00:00 2001 From: Chengwei Yang Date: Tue, 9 Jul 2013 15:07:15 +0800 Subject: [PATCH 2/2] launch-helper: return more precisely error message Bug: https://bugs.freedesktop.org/show_bug.cgi?id=66728 Signed-off-by: Chengwei Yang --- bus/config-parser-trivial.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bus/config-parser-trivial.c b/bus/config-parser-trivial.c index 64a05c3..43cb1bf 100644 --- a/bus/config-parser-trivial.c +++ b/bus/config-parser-trivial.c @@ -315,7 +315,10 @@ bus_config_parser_finished (BusConfigParser *parser, const char* bus_config_parser_get_user (BusConfigParser *parser) { - return _dbus_string_get_const_data (&parser->user); + if (_dbus_string_get_length (&parser->user) > 0) + return _dbus_string_get_const_data (&parser->user); + else + return NULL; } const char* -- 1.7.9.5