for (;;) {
DBusMessageIter sub2;
- int at, n;
- uint8_t *k;
+ int at;
if ((at = dbus_message_iter_get_arg_type(&sub)) == DBUS_TYPE_INVALID)
break;
}
dbus_message_iter_recurse(&sub, &sub2);
- dbus_message_iter_get_fixed_array(&sub2, &k, &n);
- strlst = avahi_string_list_add_arbitrary(strlst, k, n);
+
+ if (dbus_message_iter_get_array_len(&sub2) > 0) {
+ uint8_t *k;
+ int n;
+
+ dbus_message_iter_get_fixed_array(&sub2, &k, &n);
+ strlst = avahi_string_list_add_arbitrary(strlst, k, n);
+ }
dbus_message_iter_next(&sub);
}