modules:mixer: Avoid pa backend from crash
Check the pulseaudio's context error and if info is not null before get server's information.
This commit is contained in:
parent
7fb597a8ab
commit
a524d165bc
|
@ -549,6 +549,14 @@ _server_info_cb(pa_context *c, const pa_server_info *info,
|
|||
{
|
||||
pa_operation *o;
|
||||
|
||||
if (pa_context_errno(c) != PA_OK)
|
||||
{
|
||||
WRN("Could not get pa server info, error: %d", pa_context_errno(c));
|
||||
return;
|
||||
}
|
||||
|
||||
EINA_SAFETY_ON_NULL_RETURN(info);
|
||||
|
||||
if (!(o = pa_context_get_sink_info_by_name(c, info->default_sink_name,
|
||||
_sink_default_cb, userdata)))
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue