diff --git a/js/ui/endSessionDialog.js b/js/ui/endSessionDialog.js index c019e2aaa..a10b86d00 100644 --- a/js/ui/endSessionDialog.js +++ b/js/ui/endSessionDialog.js @@ -366,8 +366,10 @@ EndSessionDialog.prototype = { if (this._user.is_loaded && !dialogContent.iconName) { let iconFile = this._user.get_icon_file(); - - this._setIconFromFile(iconFile, dialogContent.iconStyleClass); + if (GLib.file_test(iconFile, GLib.FileTest.EXISTS)) + this._setIconFromFile(iconFile, dialogContent.iconStyleClass); + else + this._setIconFromName('avatar-default', dialogContent.iconStyleClass); } else if (dialogContent.iconName) { this._setIconFromName(dialogContent.iconName, dialogContent.iconStyleClass);