[gnome-shell] network: don't fail if we can't read a connection associated with an active
- From: Giovanni Campagna <gcampagna src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] network: don't fail if we can't read a connection associated with an active
- Date: Fri, 14 Jun 2013 18:39:00 +0000 (UTC)
commit 013b6aa44ae7a2791c7aaa1eb8844cb961fc2470
Author: Giovanni Campagna <gcampagna src gnome org>
Date: Sat Jun 8 15:24:20 2013 +0200
network: don't fail if we can't read a connection associated with an active
It can happen in legitimate cases, such as a version incompatibility
between NetworkManager and libnm-glib or a restricted permission.
https://bugzilla.gnome.org/show_bug.cgi?id=701849
js/ui/status/network.js | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/js/ui/status/network.js b/js/ui/status/network.js
index 747b5a0..923aaea 100644
--- a/js/ui/status/network.js
+++ b/js/ui/status/network.js
@@ -1711,8 +1711,12 @@ const NMApplet = new Lang.Class({
// Ignore slave connections
let connectionPath = activeConnections[i].connection;
- let connection = this._settings.get_connection_by_path(connectionPath)
- if (this._ignoreConnection(connection))
+ let connection = this._settings.get_connection_by_path(connectionPath);
+
+ // connection might be null, if libnm-glib fails to create
+ // the object due to version incompatibility, or if the
+ // connection is not visible to the current user
+ if (connection && this._ignoreConnection(connection))
continue;
supportedConnections.push(activeConnections[i]);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]