summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/dbus-common.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/dbus-common.c b/src/dbus-common.c
index 6c15dea2..5d04b481 100644
--- a/src/dbus-common.c
+++ b/src/dbus-common.c
@@ -300,6 +300,12 @@ void dbus_message_iter_append_dict_entry(DBusMessageIter *dict,
{
DBusMessageIter entry;
+ if (type == DBUS_TYPE_STRING) {
+ const char *str = *((const char **) val);
+ if (str == NULL)
+ return;
+ }
+
dbus_message_iter_open_container(dict, DBUS_TYPE_DICT_ENTRY,
NULL, &entry);