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



commit e1cceea542dd9a45355028ad95a5619166ca86ca
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
    
    Conflicts:
        plugins/media-keys/gsd-media-keys-manager.c

 plugins/media-keys/gsd-media-keys-manager.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/plugins/media-keys/gsd-media-keys-manager.c b/plugins/media-keys/gsd-media-keys-manager.c
index c0e39ca..fb59399 100644
--- a/plugins/media-keys/gsd-media-keys-manager.c
+++ b/plugins/media-keys/gsd-media-keys-manager.c
@@ -1053,7 +1053,8 @@ 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 &&
              g_strcmp0 (port->port, "analog-output") != 0)) {
                 device = gvc_mixer_control_lookup_device_from_stream (manager->priv->volume, stream);
                 show_osd (manager, icon,


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