1
0
mirror of https://git.sr.ht/~sircmpwn/aerc synced 2024-11-23 00:21:59 +01:00

Reapply 'Fix nil pointer deref on Envelope'

The commit bf16ccde484ce3b6d2a4b843e7ebc04a9b2a957d appears to have been
unintentionally dropped by commit 905cb9dfd3ef197bb4b59039a1be76ce2c8e3099
(Implement style configuration).
This commit is contained in:
Shaw Vrana 2021-01-02 12:18:11 -08:00 committed by Reto Brunner
parent 889d89b42e
commit 3c14c2cb34

@ -102,11 +102,14 @@ func (ml *MessageList) Draw(ctx *ui.Context) {
continue
}
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)
msg_styles := []config.StyleObject{}
// unread message