[network-manager-applet/aleksander/mm1-applet] applet: handle the case where ModemManager is lost between device state updates
- From: Aleksander Morgado <aleksm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [network-manager-applet/aleksander/mm1-applet] applet: handle the case where ModemManager is lost between device state updates
- Date: Tue, 18 Dec 2012 11:48:51 +0000 (UTC)
commit 1a2a976ab358fe9d03c892532895ddf033bc724a
Author: Aleksander Morgado <aleksander lanedo com>
Date: Tue Dec 18 12:40:45 2012 +0100
applet: handle the case where ModemManager is lost between device state updates
When NM reports a state update in a NMDevice for a modem handled by the new
ModemManager we will check whether ModemManager is running. If we find that it
is not running, a NULL device class will be returned, so handle that.
src/applet.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/applet.c b/src/applet.c
index bade3e3..f9b784d 100644
--- a/src/applet.c
+++ b/src/applet.c
@@ -2325,7 +2325,8 @@ foo_device_state_changed_cb (NMDevice *device,
NMADeviceClass *dclass;
dclass = get_device_class (device, applet);
- g_assert (dclass);
+ if (!dclass)
+ return;
dclass->device_state_changed (device, new_state, old_state, reason, applet);
applet_common_device_state_changed (device, new_state, old_state, reason, applet);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]