aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--widgets/msgviewer.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/widgets/msgviewer.go b/widgets/msgviewer.go
index cefa9bb3..f92957e5 100644
--- a/widgets/msgviewer.go
+++ b/widgets/msgviewer.go
@@ -130,6 +130,10 @@ func NewMessageViewer(acct *AccountView,
}
func fmtHeader(msg *models.MessageInfo, header string, timefmt string) string {
+ if msg == nil || msg.Envelope == nil {
+ return "error: no envelope for this message"
+ }
+
switch header {
case "From":
return format.FormatAddresses(msg.Envelope.From)