aboutsummaryrefslogtreecommitdiff
path: root/widgets
diff options
context:
space:
mode:
Diffstat (limited to 'widgets')
-rw-r--r--widgets/aerc.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/widgets/aerc.go b/widgets/aerc.go
index e7eebad..3537897 100644
--- a/widgets/aerc.go
+++ b/widgets/aerc.go
@@ -80,5 +80,9 @@ func (aerc *Aerc) Event(event tcell.Event) bool {
}
func (aerc *Aerc) SelectedAccount() *AccountView {
- return aerc.accounts[aerc.tabs.Tabs[aerc.tabs.Selected].Name]
+ acct, ok := aerc.accounts[aerc.tabs.Tabs[aerc.tabs.Selected].Name]
+ if !ok {
+ return nil
+ }
+ return acct
}