diff options
-rw-r--r-- | src/cubeb_pulse.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/cubeb_pulse.c b/src/cubeb_pulse.c index 1cac5ea..055bc5f 100644 --- a/src/cubeb_pulse.c +++ b/src/cubeb_pulse.c @@ -177,7 +177,15 @@ sink_info_callback(pa_context * context, const pa_sink_info * info, int eol, voi static void server_info_callback(pa_context * context, const pa_server_info * info, void * u) { + cubeb * ctx = u; pa_operation * o; + + if (!info) { + // If info is NULL, the pa_context_get_server_info command timed out. + WRAP(pa_threaded_mainloop_signal)(ctx->mainloop, 0); + return; + } + o = WRAP(pa_context_get_sink_info_by_name)(context, info->default_sink_name, sink_info_callback, u); if (o) { WRAP(pa_operation_unref)(o); |