summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJiří Klimeš <jklimes@redhat.com>2015-03-25 16:26:28 +0100
committerJiří Klimeš <jklimes@redhat.com>2015-04-07 09:33:34 +0200
commitef2d9f5b9ec073212e2ec161a20160118085d095 (patch)
treeeb6403252371315a0b4cdc58c538979b36365d4d
parente009a4d7487c6ab80aa9df2854de249a00216076 (diff)
downloadnetwork-manager-applet-ef2d9f5b9ec073212e2ec161a20160118085d095.tar.gz
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
-rw-r--r--src/applet-device-broadband.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/applet-device-broadband.c b/src/applet-device-broadband.c
index eaa487dc..1bf750ea 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,