From 4ab1e893f06a39bfc089cd87dbb5f15ce549c166 Mon Sep 17 00:00:00 2001 From: Adel Gadllah Date: Mon, 11 Feb 2013 17:16:44 +0100 Subject: [PATCH] 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 --- js/ui/userMenu.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/ui/userMenu.js b/js/ui/userMenu.js index 9bffe67d9..1196c662d 100644 --- a/js/ui/userMenu.js +++ b/js/ui/userMenu.js @@ -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) {