[network-manager-applet/nma-0-9-8] applet: fix crash when using MM1 in mobile broadband PIN dialog



commit 3d34b0f69004658f7752c86a6bfe22455fd87c66
Author: Dan Williams <dcbw redhat com>
Date:   Thu Feb 28 16:07:37 2013 +0100

    applet: fix crash when using MM1 in mobile broadband PIN dialog
    
    libsecret returns an empty list, so don't try to dereference that
    list.  gnome-keyring had different API so this only showed up
    with the libsecret port.

 src/applet-device-broadband.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/src/applet-device-broadband.c b/src/applet-device-broadband.c
index 7f0e539..e021278 100644
--- a/src/applet-device-broadband.c
+++ b/src/applet-device-broadband.c
@@ -402,8 +402,9 @@ keyring_pin_check_cb (GObject *source,
        }
 
        if (pin == NULL) {
-               /* Fall back to the first result's PIN */
-               pin = secret_item_get_secret (list->data);
+               /* Fall back to the first result's PIN if we have one */
+               if (list)
+                       pin = secret_item_get_secret (list->data);
                if (pin == NULL) {
                        unlock_dialog_new (info->device, info);
                        return;


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