Fix segfault on delete
This commit is contained in:
parent
32381592fc
commit
572d9ff728
1 changed files with 5 additions and 1 deletions
|
@ -185,7 +185,11 @@ func (acct *AccountView) SelectedMessage() (*models.MessageInfo, error) {
|
|||
if len(acct.msglist.Store().Uids()) == 0 {
|
||||
return nil, errors.New("no message selected")
|
||||
}
|
||||
return acct.msglist.Selected(), nil
|
||||
msg := acct.msglist.Selected()
|
||||
if msg == nil {
|
||||
return nil, errors.New("message not loaded")
|
||||
}
|
||||
return msg, nil
|
||||
}
|
||||
|
||||
func (acct *AccountView) SelectedMessagePart() *PartInfo {
|
||||
|
|
Loading…
Reference in a new issue