[gnome-control-center] sound: Fixup "set default source" patch
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] sound: Fixup "set default source" patch
- Date: Wed, 11 Jul 2012 10:04:44 +0000 (UTC)
commit ca29f85201dbd9de72a863e2d67fa198e452db35
Author: David Henningsson <david henningsson canonical com>
Date: Tue Jul 10 17:51:39 2012 +0200
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
panels/sound/gvc-mixer-control.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/panels/sound/gvc-mixer-control.c b/panels/sound/gvc-mixer-control.c
index 0fcb107..cbcb637 100644
--- a/panels/sound/gvc-mixer-control.c
+++ b/panels/sound/gvc-mixer-control.c
@@ -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);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]