diff options
author | Wiktor Kwapisiewicz <wiktor@metacode.biz> | 2019-11-28 19:20:45 +0100 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2019-12-04 09:45:07 -0500 |
commit | abd9e78f024580d476cb299a575a7aa54c53a4b4 (patch) | |
tree | 932b3d04383dcff7764bdcdbc2980abe68d9ab0a /lib/format | |
parent | 31e3e9f56e0b8123f0238537112496b407055aef (diff) |
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 'lib/format')
0 files changed, 0 insertions, 0 deletions