Reapply 'Fix nil pointer deref on Envelope'

The commit bf16ccde48 appears to have been
unintentionally dropped by commit 905cb9dfd3
(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
1 changed files with 6 additions and 3 deletions

View File

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