values_received = TRUE;
dbus_message_iter_init(reply, &iter);
+ if (dbus_message_iter_has_next(&iter) == FALSE)
+ goto done;
+
dbus_message_iter_recurse(&iter, &dict);
while (dbus_message_iter_get_arg_type(&dict) == DBUS_TYPE_DICT_ENTRY) {
DBusMessageIter entry, value;
goto done;
dbus_message_iter_init(reply, &iter);
+ if (dbus_message_iter_has_next(&iter) == FALSE)
+ goto done;
+
dbus_message_iter_recurse(&iter, &dict);
while (dbus_message_iter_get_arg_type(&dict) == DBUS_TYPE_DICT_ENTRY) {
DBusMessageIter entry, value;