[network-manager-applet/nma-0-9-8] broadband: fix crash when ModemManager is not available (rh #1089765)



commit 5b7a60ee0a819ac174784738ba7fc4482fa801a3
Author: Jiří Klimeš <jklimes redhat com>
Date:   Tue Apr 22 09:44:55 2014 +0200

    broadband: fix crash when ModemManager is not available (rh #1089765)
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1089765
    (cherry picked from commit 3b7c84a9b142ec30142529a9521f985588aea255)

 src/applet-device-broadband.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/src/applet-device-broadband.c b/src/applet-device-broadband.c
index f4b64ff..f1fdee3 100644
--- a/src/applet-device-broadband.c
+++ b/src/applet-device-broadband.c
@@ -626,6 +626,11 @@ get_icon (NMDevice *device,
 {
        BroadbandDeviceInfo *info;
 
+       if (!applet->mm1) {
+               g_warning ("ModemManager is not available for modem at %s", nm_device_get_udi (device));
+               return NULL;
+       }
+
        info = g_object_get_data (G_OBJECT (device), "devinfo");
        g_assert (info);
 


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