From ad68a9e4e471eb708893ad16601ab14a4672a2da Mon Sep 17 00:00:00 2001 From: Kevin Kuehler Date: Fri, 1 Nov 2019 19:36:01 -0700 Subject: widgets/msgviewer: Don't crash if pager is nil Signed-off-by: Kevin Kuehler --- widgets/msgviewer.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/widgets/msgviewer.go b/widgets/msgviewer.go index 05da2a08..7cd55535 100644 --- a/widgets/msgviewer.go +++ b/widgets/msgviewer.go @@ -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) -- cgit