sink-input, source-output: Don't crash if format negotiation fails
A segfault was reported on this line:
pa_return_val_if_fail(PA_SINK_IS_LINKED(pa_sink_get_state(data->sink)), -PA_ERR_BADSTATE);
After expanding the pa_sink_get_state() macro, the line looks like
this:
pa_return_val_if_fail(PA_SINK_IS_LINKED(data->sink->state), -PA_ERR_BADSTATE);
So data->sink was apparently NULL. That could happen if we try to fall
back to the default sink, but format negotiation fails.
This bug was introduced in commit
71816ecb7f81fe7a124cefa2258cfa64046908a1.
BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=74646