[gnome-shell] networkAgent: Only unregister if we've registered
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] networkAgent: Only unregister if we've registered
- Date: Wed, 12 Dec 2012 11:36:09 +0000 (UTC)
commit 15cac0157c5ee66c150a2fa1fa254bbbebd9ac09
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Sat Dec 8 02:41:20 2012 -0500
networkAgent: Only unregister if we've registered
It's possible to turn auto_register back on, but not immediately be
registered. Don't cause a (harmless) critical in this case.
https://bugzilla.gnome.org/show_bug.cgi?id=689884
js/ui/components/networkAgent.js | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/js/ui/components/networkAgent.js b/js/ui/components/networkAgent.js
index d1c9846..e214cd8 100644
--- a/js/ui/components/networkAgent.js
+++ b/js/ui/components/networkAgent.js
@@ -613,7 +613,8 @@ const NetworkAgent = new Lang.Class({
this._vpnRequests = { };
this._native.auto_register = false;
- this._native.unregister();
+ if (this._native.registered)
+ this._native.unregister();
},
_newRequest: function(agent, requestId, connection, settingName, hints, flags) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]