diff --git a/pipewire/client/stream.c b/pipewire/client/stream.c index d7ac73925..f84eeb767 100644 --- a/pipewire/client/stream.c +++ b/pipewire/client/stream.c @@ -1009,7 +1009,10 @@ bool pw_stream_disconnect(struct pw_stream *stream) unhandle_socket(stream); - pw_client_node_do_destroy(impl->node_proxy); + if (impl->node_proxy) { + pw_client_node_do_destroy(impl->node_proxy); + impl->node_proxy = NULL; + } return true; } diff --git a/pipewire/client/stream.h b/pipewire/client/stream.h index 2358e5205..7293f9c2d 100644 --- a/pipewire/client/stream.h +++ b/pipewire/client/stream.h @@ -219,7 +219,8 @@ struct pw_stream { PW_SIGNAL(state_changed, (struct pw_listener *listener, struct pw_stream *stream)); /** Emited when the format changed. The listener should call - * pw_stream_finish_format() to complete format negotiation */ + * pw_stream_finish_format() from within this signal or later to complete + * the format negotiation */ PW_SIGNAL(format_changed, (struct pw_listener *listener, struct pw_stream *stream, struct spa_format *format));