[gnome-settings-daemon/gnome-3-8] media-keys: Fix crash when changing the volume



commit 45fd5110220fb3d5f07beb09c66d7a81140367f6
Author: Bastien Nocera <hadess hadess net>
Date:   Fri Apr 12 13:31:06 2013 +0200

    media-keys: Fix crash when changing the volume
    
    For certain streams, we will have no port assigned, so don't
    crash accessing the port's name.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=697851

 plugins/media-keys/gsd-media-keys-manager.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/plugins/media-keys/gsd-media-keys-manager.c b/plugins/media-keys/gsd-media-keys-manager.c
index f164c13..c3b31b2 100644
--- a/plugins/media-keys/gsd-media-keys-manager.c
+++ b/plugins/media-keys/gsd-media-keys-manager.c
@@ -1053,7 +1053,7 @@ update_dialog (GsdMediaKeysManager *manager,
         icon = get_icon_name_for_volume (!GVC_IS_MIXER_SINK (stream), muted, vol);
         port = gvc_mixer_stream_get_port (stream);
         if (g_strcmp0 (gvc_mixer_stream_get_form_factor (stream), "internal") != 0 ||
-            g_strcmp0 (port->port, "analog-output-speaker") != 0) {
+            (port != NULL && g_strcmp0 (port->port, "analog-output-speaker") != 0)) {
                 device = gvc_mixer_control_lookup_device_from_stream (manager->priv->volume, stream);
                 show_osd (manager, icon,
                           gvc_mixer_ui_device_get_description (device), vol);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]