[network-manager-applet/jk/applet-abort-rh1205316: 1/2] applet: do not crash when getting icon for unavailable modem (rh #1205316)
- From: Jiří Klimeš <jklimes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [network-manager-applet/jk/applet-abort-rh1205316: 1/2] applet: do not crash when getting icon for unavailable modem (rh #1205316)
- Date: Thu, 2 Apr 2015 12:14:22 +0000 (UTC)
commit 772ef77d9d5ba67e2ecb3ab883f090976422ae7d
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]