polKitAgent: Don't crash when we cannot enable/disable the auth agent

This makes it easier to run with jhbuild.

https://bugzilla.gnome.org/show_bug.cgi?id=687556
This commit is contained in:
Adel Gadllah 2012-11-04 11:53:22 +01:00
parent 386929e84b
commit dd6fe58475

View File

@ -335,11 +335,19 @@ const AuthenticationAgent = new Lang.Class({
},
enable: function() {
try {
this._native.register();
} catch(e) {
log('Failed to register AuthenticationAgent');
}
},
disable: function() {
try {
this._native.unregister();
} catch(e) {
log('Failed to unregister AuthenticationAgent');
}
},
_onInitiate: function(nativeAgent, actionId, message, iconName, cookie, userNames) {