From cd77ceebbc0b208a20d94da315508f32a46d93ff Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Tue, 11 Feb 2020 12:06:59 +0100 Subject: [PATCH] impl-port: warn and not crash when spa-node has no properties When a spa-node tells us it has updated properties but then gives us a NULL pointer, emit a warning instead of crashing. --- src/pipewire/impl-port.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/pipewire/impl-port.c b/src/pipewire/impl-port.c index 1b45f9859..50d036ea4 100644 --- a/src/pipewire/impl-port.c +++ b/src/pipewire/impl-port.c @@ -329,7 +329,11 @@ static void update_info(struct pw_impl_port *port, const struct spa_port_info *i port->spa_flags = info->flags; } if (info->change_mask & SPA_PORT_CHANGE_MASK_PROPS) { - update_properties(port, info->props); + if (info->props) { + update_properties(port, info->props); + } else { + pw_log_warn(NAME" %p: port PROPS update but no properties"); + } } if (info->change_mask & SPA_PORT_CHANGE_MASK_PARAMS) { uint32_t i;