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
This commit is contained in:
Jasper St. Pierre 2012-12-08 02:41:20 -05:00
parent fc696bc054
commit 15cac0157c

View File

@ -613,6 +613,7 @@ const NetworkAgent = new Lang.Class({
this._vpnRequests = { };
this._native.auto_register = false;
if (this._native.registered)
this._native.unregister();
},