aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/account.go
diff options
context:
space:
mode:
Diffstat (limited to 'widgets/account.go')
-rw-r--r--widgets/account.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/widgets/account.go b/widgets/account.go
index 6c9ab3eb..85043d1f 100644
--- a/widgets/account.go
+++ b/widgets/account.go
@@ -198,6 +198,9 @@ func (acct *AccountView) SelectedDirectory() string {
}
func (acct *AccountView) SelectedMessage() (*models.MessageInfo, error) {
+ if acct.msglist == nil || acct.msglist.Store() == nil {
+ return nil, errors.New("init in progress")
+ }
if len(acct.msglist.Store().Uids()) == 0 {
return nil, errors.New("no message selected")
}