[network-manager-applet/nma-0-9-10] 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/nma-0-9-10] applet: do not crash when getting icon for unavailable modem (rh #1205316)
- Date: Tue, 7 Apr 2015 07:55:00 +0000 (UTC)
commit 07c762c1d16a69ad67cfb8804c54aa6356616674
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
(cherry picked from commit ef2d9f5b9ec073212e2ec161a20160118085d095)
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 856c5fe..72d209a 100644
--- a/src/applet-device-broadband.c
+++ b/src/applet-device-broadband.c
@@ -631,7 +631,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 NULL;
+ }
return mobile_helper_get_icon (device,
state,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]