[network-manager-applet/jk/applet-abort-rh1205316] applet: do not crash when getting icon for unavailable modem (rh #1205316)



commit 119980facf55a275f632d3ba37af6b13dd64c60a
Author: Jiří Klimeš <jklimes redhat com>
Date:   Wed Mar 25 16:26:28 2015 +0100

    applet: do not crash when getting icon for unavailable modem (rh #1205316)
    
    Just print a warning and return from the function.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1205316

 src/applet-device-broadband.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/src/applet-device-broadband.c b/src/applet-device-broadband.c
index eaa487d..1bf750e 100644
--- a/src/applet-device-broadband.c
+++ b/src/applet-device-broadband.c
@@ -633,7 +633,11 @@ get_icon (NMDevice *device,
        }
 
        info = g_object_get_data (G_OBJECT (device), "devinfo");
-       g_assert (info);
+       if (!info) {
+               g_warning ("ModemManager is not available for modem at %s",
+                          nm_device_get_udi (device));
+               return;
+       }
 
        mobile_helper_get_icon (device,
                                state,


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