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
This commit is contained in:
Giovanni Campagna 2013-06-08 15:24:20 +02:00
parent 0e7d3a7558
commit 013b6aa44a

View File

@ -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]);