summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKevin Kuehler <keur@xcf.berkeley.edu>2019-11-01 19:36:01 -0700
committerDrew DeVault <sir@cmpwn.com>2019-11-10 10:11:34 -0500
commitad68a9e4e471eb708893ad16601ab14a4672a2da (patch)
treea575ea3d868cc5182f7a7243a62bdd2b197b721c
parent331b915139e23073aa42bf28d67901383dd859ca (diff)
downloadaerc-ad68a9e4e471eb708893ad16601ab14a4672a2da.tar.gz
widgets/msgviewer: Don't crash if pager is nil
Signed-off-by: Kevin Kuehler <keur@xcf.berkeley.edu>
-rw-r--r--widgets/msgviewer.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/widgets/msgviewer.go b/widgets/msgviewer.go
index 05da2a0..7cd5553 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)