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:
parent
70bc3d178b
commit
4ab1e893f0
@ -68,7 +68,7 @@ const UserAvatarWidget = new Lang.Class({
|
|||||||
|
|
||||||
update: function() {
|
update: function() {
|
||||||
let iconFile = this._user.get_icon_file();
|
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;
|
iconFile = null;
|
||||||
|
|
||||||
if (iconFile) {
|
if (iconFile) {
|
||||||
|
Loading…
Reference in New Issue
Block a user