~sircmpwn/aerc

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch
1

[PATCH] widgets/msgviewer: Don't crash if pager is nil

Details
Message ID
<20191102023601.24750-1-keur@xcf.berkeley.edu>
DKIM signature
missing
Download raw message
Patch: +1 -1
Signed-off-by: Kevin Kuehler <keur@xcf.berkeley.edu>
---
 widgets/msgviewer.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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)
--
2.23.0
Details
Message ID
<BYCBEGG06G6G.3HGXXLJAW19T1@homura>
In-Reply-To
<20191102023601.24750-1-keur@xcf.berkeley.edu> (view parent)
DKIM signature
pass
Download raw message
Thanks!

To git.sr.ht:~sircmpwn/aerc
   331b915..3ba69ed  master -> master