[gnome-shell] networkAgent: Only unregister if we've registered



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]