pw-dump: handle NULL in link format

This commit is contained in:
Wim Taymans 2020-12-15 10:17:47 +01:00
parent 0e910a9d03
commit 5e99ff52e7

View file

@ -452,10 +452,14 @@ static void put_pod_value(struct data *d, const char *key, const struct spa_type
} }
static void put_pod(struct data *d, const char *key, const struct spa_pod *pod) static void put_pod(struct data *d, const char *key, const struct spa_pod *pod)
{ {
if (pod == NULL) {
put_value(d, key, NULL);
} else {
put_pod_value(d, key, SPA_TYPE_ROOT, put_pod_value(d, key, SPA_TYPE_ROOT,
SPA_POD_TYPE(pod), SPA_POD_TYPE(pod),
SPA_POD_BODY(pod), SPA_POD_BODY(pod),
SPA_POD_BODY_SIZE(pod)); SPA_POD_BODY_SIZE(pod));
}
} }
static void put_params(struct data *d, const char *key, static void put_params(struct data *d, const char *key,