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



commit 3b7c84a9b142ec30142529a9521f985588aea255
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

 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 4e9f205..2300c0d 100644
--- a/src/applet-device-broadband.c
+++ b/src/applet-device-broadband.c
@@ -625,6 +625,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]