From 452ac297abb07acd4e4abd77a360ec4a0aa4ff44 Mon Sep 17 00:00:00 2001 From: Giovanni Campagna Date: Mon, 10 Sep 2012 10:18:03 +0200 Subject: [PATCH] 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 --- js/ui/components/polkitAgent.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/ui/components/polkitAgent.js b/js/ui/components/polkitAgent.js index 0fa9ba449..2f710df84 100644 --- a/js/ui/components/polkitAgent.js +++ b/js/ui/components/polkitAgent.js @@ -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(); }