~sircmpwn/aerc

ad68a9e4e471eb708893ad16601ab14a4672a2da — Kevin Kuehler 1 year, 2 months ago 331b915
widgets/msgviewer: Don't crash if pager is nil

Signed-off-by: Kevin Kuehler <keur@xcf.berkeley.edu>
1 files changed, 1 insertions(+), 1 deletions(-)

M widgets/msgviewer.go
M widgets/msgviewer.go => widgets/msgviewer.go +1 -1
@@ 506,7 506,7 @@ func (pv *PartViewer) SetSource(reader io.Reader) {
}

func (pv *PartViewer) attemptCopy() {
	if pv.source != nil && pv.pager.Process != nil {
	if pv.source != nil && pv.pager != nil && pv.pager.Process != nil {
		header := message.Header{}
		header.SetText("Content-Transfer-Encoding", pv.part.Encoding)
		header.SetContentType(pv.part.MIMEType, pv.part.Params)