userMenu: Handle the case where the user has no icon file

Fix a crash in UserAvatarWidget.update that gets triggered when the user has
no icon file.

https://bugzilla.gnome.org/show_bug.cgi?id=693385
This commit is contained in:
Adel Gadllah 2013-02-11 17:16:44 +01:00
parent 70bc3d178b
commit 4ab1e893f0

View File

@ -68,7 +68,7 @@ const UserAvatarWidget = new Lang.Class({
update: function() {
let iconFile = this._user.get_icon_file();
if (!GLib.file_test(iconFile, GLib.FileTest.EXISTS))
if (iconFile && !GLib.file_test(iconFile, GLib.FileTest.EXISTS))
iconFile = null;
if (iconFile) {