diff --git a/src/pipewire/log.c b/src/pipewire/log.c index e3a06e784..9e23cfbbd 100644 --- a/src/pipewire/log.c +++ b/src/pipewire/log.c @@ -338,9 +338,13 @@ void pw_log_log_object(enum spa_log_level level, struct log_ctx ctx = { level, file, 0, func, }; if (flags & PW_LOG_OBJECT_POD) { const struct spa_pod *pod = object; - log_pod_value(&ctx, 0, SPA_TYPE_ROOT, - SPA_POD_TYPE(pod), - SPA_POD_BODY(pod), - SPA_POD_BODY_SIZE(pod)); + if (pod == NULL) { + pw_log_log(level, file, line, func, "NULL"); + } else { + log_pod_value(&ctx, 0, SPA_TYPE_ROOT, + SPA_POD_TYPE(pod), + SPA_POD_BODY(pod), + SPA_POD_BODY_SIZE(pod)); + } } }