From 15cac0157c5ee66c150a2fa1fa254bbbebd9ac09 Mon Sep 17 00:00:00 2001 From: "Jasper St. Pierre" Date: Sat, 8 Dec 2012 02:41:20 -0500 Subject: [PATCH] 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 file changed, 2 insertions(+), 1 deletion(-) diff --git a/js/ui/components/networkAgent.js b/js/ui/components/networkAgent.js index d1c984643..e214cd87c 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) {