[gnome-media] Fix possible crasher with no port on a source
- From: Bastien Nocera <hadess src gnome org>
- To: svn-commits-list gnome org
- Subject: [gnome-media] Fix possible crasher with no port on a source
- Date: Mon, 27 Jul 2009 16:00:26 +0000 (UTC)
commit f946961da583166e04be114a02ac456dfb5155a2
Author: Bastien Nocera <hadess hadess net>
Date: Mon Jul 27 16:59:59 2009 +0100
Fix possible crasher with no port on a source
gnome-volume-control/src/gvc-mixer-control.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/gnome-volume-control/src/gvc-mixer-control.c b/gnome-volume-control/src/gvc-mixer-control.c
index 837fb05..0b5feee 100644
--- a/gnome-volume-control/src/gvc-mixer-control.c
+++ b/gnome-volume-control/src/gvc-mixer-control.c
@@ -760,7 +760,8 @@ update_source (GvcMixerControl *control,
gvc_mixer_stream_set_can_decibel (stream, !!(info->flags & PA_SOURCE_DECIBEL_VOLUME));
gvc_mixer_stream_set_base_volume (stream, (guint32) info->base_volume);
#if PA_MICRO > 15
- gvc_mixer_stream_set_port (stream, info->active_port->name);
+ if (info->active_port != NULL)
+ gvc_mixer_stream_set_port (stream, info->active_port->name);
#endif /* PA_MICRO > 15 */
if (is_new) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]