summaryrefslogtreecommitdiff
path: root/commands
diff options
context:
space:
mode:
authorZach Sisco <zach@zsisco.net>2019-07-02 21:46:05 -0400
committerDrew DeVault <sir@cmpwn.com>2019-07-04 11:08:08 -0400
commitddd0fa428f0a0e394883cdec2a11c351b70f72a2 (patch)
tree21e4e0ff7b64d5175ac3b5656c4f397126e97f92 /commands
parent030f39043628f01b174ebb11595a4e74da95f0b3 (diff)
downloadaerc-ddd0fa428f0a0e394883cdec2a11c351b70f72a2.zip
Crash on delete in empty folder (#213)
Diffstat (limited to 'commands')
-rw-r--r--commands/msg/delete.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/commands/msg/delete.go b/commands/msg/delete.go
index 5a72fc9..104e1e1 100644
--- a/commands/msg/delete.go
+++ b/commands/msg/delete.go
@@ -35,6 +35,9 @@ func (_ Delete) Execute(aerc *widgets.Aerc, args []string) error {
return errors.New("No account selected")
}
store := widget.Store()
+ if len(store.Uids) == 0 {
+ return errors.New("No message selected")
+ }
msg := widget.SelectedMessage()
_, isMsgView := widget.(*widgets.MessageViewer)
if isMsgView {