about summary refs log tree commit diff stats
path: root/go.mod
diff options
context:
space:
mode:
authorWiktor Kwapisiewicz <wiktor@metacode.biz>2019-11-28 19:20:45 +0100
committerDrew DeVault <sir@cmpwn.com>2019-12-04 09:45:07 -0500
commitabd9e78f024580d476cb299a575a7aa54c53a4b4 (patch)
tree932b3d04383dcff7764bdcdbc2980abe68d9ab0a /go.mod
parent31e3e9f56e0b8123f0238537112496b407055aef (diff)
downloadaerc-abd9e78f024580d476cb299a575a7aa54c53a4b4.tar.gz
Fix crash when no message is selected
Pressing `Enter` on a view that has not yet loaded messages (e.g. at
startup) would return `nil` from `Selected()`. Accessing `msg.Uid` on a
`nil` reference crashes aerc.

This patch moves the `msg == nil` check before accessing `msg.Uid` thus
avoiding the crash.

To test this patch repeatedly press `Enter` on startup.
Diffstat (limited to 'go.mod')
0 files changed, 0 insertions, 0 deletions