alsa: handle NULL io

It is possible that the port io is set to NULL when the node is
negotiating or destroying.

Fixes #4734
This commit is contained in:
Wim Taymans 2025-06-10 10:51:23 +02:00
parent 930f2f3e2d
commit 9b36e576cb

View file

@ -3404,11 +3404,13 @@ static int playback_ready(struct state *state)
{
struct spa_io_buffers *io = state->io;
spa_log_trace_fp(state->log, "%p: %d", state, io->status);
spa_log_trace_fp(state->log, "%p: %d", state, io ? io->status : 0);
update_sources(state, false);
io->status = SPA_STATUS_NEED_DATA;
if (io != NULL)
io->status = SPA_STATUS_NEED_DATA;
return spa_node_call_ready(&state->callbacks, SPA_STATUS_NEED_DATA);
}