summary refs log tree commit diff stats
path: root/commands/msg/copy.go
diff options
context:
space:
mode:
authorDaniel Bridges <bridges2@gmail.com>2019-07-09 17:04:21 -0700
committerDrew DeVault <sir@cmpwn.com>2019-07-10 13:21:38 -0400
commit217e85a55d0c1047bef1e2bc41783ccd4629bfc1 (patch)
tree5e06a60ccc27e59e4eef63315cea5065b5c3e8c6 /commands/msg/copy.go
parent3f30c27bb31f26ca639b7a87d54a7c522bbe8be0 (diff)
downloadaerc-217e85a55d0c1047bef1e2bc41783ccd4629bfc1.tar.gz
Fix crashes when operating on empty folder (#216)
Diffstat (limited to 'commands/msg/copy.go')
-rw-r--r--commands/msg/copy.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/commands/msg/copy.go b/commands/msg/copy.go
index 4d65d24..48bccd4 100644
--- a/commands/msg/copy.go
+++ b/commands/msg/copy.go
@@ -44,7 +44,10 @@ func (_ Copy) Execute(aerc *widgets.Aerc, args []string) error {
 	}
 
 	widget := aerc.SelectedTab().(widgets.ProvidesMessage)
-	msg := widget.SelectedMessage()
+	msg, err := widget.SelectedMessage()
+	if err != nil {
+		return err
+	}
 	store := widget.Store()
 	store.Copy([]uint32{msg.Uid}, args[optind], createParents, func(
 		msg types.WorkerMessage) {