PolkitAgent: don't crash if there is no avatar

If we're asking for root's password, we don't show an avatar. Don't
emit an exception in that case.

https://bugzilla.gnome.org/show_bug.cgi?id=683707
This commit is contained in:
Giovanni Campagna 2012-09-10 10:18:03 +02:00
parent 7ebb5c6a10
commit 452ac297ab

View File

@ -299,7 +299,7 @@ const AuthenticationDialog = new Lang.Class({
},
_onUserChanged: function() {
if (this._user.is_loaded) {
if (this._user.is_loaded && this._userAvatar) {
this._userAvatar.update();
this._userAvatar.actor.show();
}