[gnome-shell] PolkitAgent: don't crash if there is no avatar



commit 452ac297abb07acd4e4abd77a360ec4a0aa4ff44
Author: Giovanni Campagna <gcampagna src gnome org>
Date:   Mon Sep 10 10:18:03 2012 +0200

    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 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/js/ui/components/polkitAgent.js b/js/ui/components/polkitAgent.js
index 0fa9ba4..2f710df 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();
         }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]