From 8942b74c185c5d6bdde88ded3d395eea762c738a Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Wed, 28 Feb 2024 11:28:22 +0100 Subject: [PATCH] audioconvert: handle port remove The info is NULL when the port is removed, don't crash on that. --- spa/plugins/audioconvert/audioadapter.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/spa/plugins/audioconvert/audioadapter.c b/spa/plugins/audioconvert/audioadapter.c index 3d31e9ac7..9c93a56b9 100644 --- a/spa/plugins/audioconvert/audioadapter.c +++ b/spa/plugins/audioconvert/audioadapter.c @@ -1040,6 +1040,9 @@ static void follower_convert_port_info(void *data, uint32_t i; int res; + if (info == NULL) + return; + spa_log_debug(this->log, "%p: convert port info %s %p %08"PRIx64, this, this->direction == SPA_DIRECTION_INPUT ? "Input" : "Output", info, info->change_mask); @@ -1217,6 +1220,9 @@ static void follower_port_info(void *data, uint32_t i; int res; + if (info == NULL) + return; + if (this->follower_removing) { spa_node_emit_port_info(&this->hooks, direction, port_id, NULL); return;