about summary refs log tree commit diff stats
path: root/widgets/msglist.go
diff options
context:
space:
mode:
Diffstat (limited to 'widgets/msglist.go')
-rw-r--r--widgets/msglist.go10
1 files changed, 7 insertions, 3 deletions
diff --git a/widgets/msglist.go b/widgets/msglist.go
index 626f4c9..1ed6bb1 100644
--- a/widgets/msglist.go
+++ b/widgets/msglist.go
@@ -123,11 +123,15 @@ func (ml *MessageList) Draw(ctx *ui.Context) {
 		}
 
 		ctx.Fill(0, row, textWidth, 1, ' ', style)
-		uiConfig := ml.conf.GetUiConfig(map[config.ContextType]string{
+
+		confParams := map[config.ContextType]string{
 			config.UI_CONTEXT_ACCOUNT: ml.aerc.SelectedAccount().AccountConfig().Name,
 			config.UI_CONTEXT_FOLDER:  ml.aerc.SelectedAccount().Directories().Selected(),
-			config.UI_CONTEXT_SUBJECT: msg.Envelope.Subject,
-		})
+		}
+		if msg.Envelope != nil {
+			confParams[config.UI_CONTEXT_SUBJECT] = msg.Envelope.Subject
+		}
+		uiConfig := ml.conf.GetUiConfig(confParams)
 
 		fmtStr, args, err := format.ParseMessageFormat(
 			ml.aerc.SelectedAccount().acct.From,