aboutsummaryrefslogtreecommitdiffstats
path: root/commands/msg/copy.go
diff options
context:
space:
mode:
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 48bccd4d..6bf33cd7 100644
--- a/commands/msg/copy.go
+++ b/commands/msg/copy.go
@@ -44,11 +44,14 @@ func (_ Copy) Execute(aerc *widgets.Aerc, args []string) error {
}
widget := aerc.SelectedTab().(widgets.ProvidesMessage)
+ store := widget.Store()
+ if store == nil {
+ return errors.New("Cannot perform action. Messages still loading")
+ }
msg, err := widget.SelectedMessage()
if err != nil {
return err
}
- store := widget.Store()
store.Copy([]uint32{msg.Uid}, args[optind], createParents, func(
msg types.WorkerMessage) {