mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-20 06:59:58 -05:00
log: handle logging of NULL object
This commit is contained in:
parent
56730197d9
commit
b4112968cf
1 changed files with 8 additions and 4 deletions
|
|
@ -338,9 +338,13 @@ void pw_log_log_object(enum spa_log_level level,
|
||||||
struct log_ctx ctx = { level, file, 0, func, };
|
struct log_ctx ctx = { level, file, 0, func, };
|
||||||
if (flags & PW_LOG_OBJECT_POD) {
|
if (flags & PW_LOG_OBJECT_POD) {
|
||||||
const struct spa_pod *pod = object;
|
const struct spa_pod *pod = object;
|
||||||
log_pod_value(&ctx, 0, SPA_TYPE_ROOT,
|
if (pod == NULL) {
|
||||||
SPA_POD_TYPE(pod),
|
pw_log_log(level, file, line, func, "NULL");
|
||||||
SPA_POD_BODY(pod),
|
} else {
|
||||||
SPA_POD_BODY_SIZE(pod));
|
log_pod_value(&ctx, 0, SPA_TYPE_ROOT,
|
||||||
|
SPA_POD_TYPE(pod),
|
||||||
|
SPA_POD_BODY(pod),
|
||||||
|
SPA_POD_BODY_SIZE(pod));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue