From ddd0fa428f0a0e394883cdec2a11c351b70f72a2 Mon Sep 17 00:00:00 2001 From: Zach Sisco Date: Tue, 2 Jul 2019 21:46:05 -0400 Subject: Crash on delete in empty folder (#213) --- commands/msg/delete.go | 3 +++ 1 file changed, 3 insertions(+) (limited to 'commands/msg') 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 { -- cgit 1.4.1-2-gfad0