From 7afd865d67e1b32fedda4171c66250246695d7a4 Mon Sep 17 00:00:00 2001
From: rswindell <>
Date: Tue, 11 Jun 2019 07:27:55 +0000
Subject: [PATCH] Fixed bug when viewing email msgs from users without an
 avatar: !JavaScript .../showmsgavatar.js line 27: TypeError:
 msg_area.sub[sub] is undefined

---
 exec/showmsgavatar.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/exec/showmsgavatar.js b/exec/showmsgavatar.js
index eb514a6c8b..1ca7ee1b95 100644
--- a/exec/showmsgavatar.js
+++ b/exec/showmsgavatar.js
@@ -37,7 +37,7 @@ if(!(bbs.msg_attr&MSG_ANONYMOUS)
 	var Avatar = load({}, 'avatar_lib.js');
 	var success = Avatar.draw(bbs.msg_from_ext, bbs.msg_from, bbs.msg_from_net, /* above: */true, /* right-justified: */true
 		,bbs.msghdr_top_of_screen);
-	if(!success) {
+	if(!success && bbs.smb_sub_code) {
 		draw_default_avatar(bbs.smb_sub_code);
 	}
 	console.attributes = 7;	// Clear the background attribute as the next line might scroll, filling with BG attribute
-- 
GitLab