[gnome-shell] userMenu: Handle the case where the user has no icon file
- From: Adel Gadllah <agadllah src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] userMenu: Handle the case where the user has no icon file
- Date: Mon, 11 Feb 2013 18:39:12 +0000 (UTC)
commit 4ab1e893f06a39bfc089cd87dbb5f15ce549c166
Author: Adel Gadllah <adel gadllah gmail com>
Date: Mon Feb 11 17:16:44 2013 +0100
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 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/js/ui/userMenu.js b/js/ui/userMenu.js
index 9bffe67..1196c66 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) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]