sound: Fixup "set default source" patch
The previous commit introduced a segfault due to referencing a NULL pointer. https://bugzilla.gnome.org/show_bug.cgi?id=674925
This commit is contained in:
parent
0d4aa158d8
commit
ca29f85201
1 changed files with 3 additions and 3 deletions
|
@ -142,7 +142,7 @@ gvc_mixer_control_stream_restore_cb (pa_context *c,
|
|||
pa_operation *o;
|
||||
pa_ext_stream_restore_info new_info;
|
||||
|
||||
if (eol || new_stream == NULL)
|
||||
if (new_stream == NULL)
|
||||
return;
|
||||
|
||||
new_info.name = info->name;
|
||||
|
@ -175,7 +175,7 @@ gvc_mixer_control_stream_restore_sink_cb (pa_context *c,
|
|||
void *userdata)
|
||||
{
|
||||
GvcMixerControl *control = (GvcMixerControl *) userdata;
|
||||
if (!g_str_has_prefix(info->name, "sink-input-by"))
|
||||
if (eol || info == NULL || !g_str_has_prefix(info->name, "sink-input-by"))
|
||||
return;
|
||||
gvc_mixer_control_stream_restore_cb (c, control->priv->new_default_sink_stream, info, eol, control);
|
||||
}
|
||||
|
@ -187,7 +187,7 @@ gvc_mixer_control_stream_restore_source_cb (pa_context *c,
|
|||
void *userdata)
|
||||
{
|
||||
GvcMixerControl *control = (GvcMixerControl *) userdata;
|
||||
if (!g_str_has_prefix(info->name, "source-output-by"))
|
||||
if (eol || info == NULL || !g_str_has_prefix(info->name, "source-output-by"))
|
||||
return;
|
||||
gvc_mixer_control_stream_restore_cb (c, control->priv->new_default_source_stream, info, eol, control);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue