From e6c2ac34502b6bfec10af4aaeb200b9692da0a09 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Tue, 10 May 2022 15:36:00 +0200 Subject: [PATCH] stream: handle set_control when not connected When we are not connected, return -EIO from set_control instead of crashing later. --- src/pipewire/stream.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/pipewire/stream.c b/src/pipewire/stream.c index 35f131180..193f7a1cf 100644 --- a/src/pipewire/stream.c +++ b/src/pipewire/stream.c @@ -2081,6 +2081,9 @@ int pw_stream_set_control(struct pw_stream *stream, uint32_t id, uint32_t n_valu struct spa_pod *pod; struct control *c; + if (impl->node == NULL) + return -EIO; + va_start(varargs, values); spa_pod_builder_push_object(&b, &f[0], SPA_TYPE_OBJECT_Props, SPA_PARAM_Props);