diff options
Diffstat (limited to 'widgets')
-rw-r--r-- | widgets/aerc.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/widgets/aerc.go b/widgets/aerc.go index e7eebad9..3537897d 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 } |