Browse Source

plugins/base: Add missing nil check for getMailboxByType

Fixes panic if there is no usable Sent folder.
master
fox.cpp 4 years ago
committed by Simon Ser
parent
commit
62910a94fb
No known key found for this signature in database GPG Key ID: FDE7BE0E88F5E48
1 changed files with 3 additions and 0 deletions
  1. +3
    -0
      plugins/base/imap.go

+ 3
- 0
plugins/base/imap.go View File

@@ -130,6 +130,9 @@ func getMailboxByType(conn *imapclient.Client, mboxType mailboxType) (*MailboxIn
return nil, fmt.Errorf("failed to get mailbox with attribute %q: %v", attr, err)
}

if best == nil {
return nil, nil
}
return &MailboxInfo{best}, nil
}



Loading…
Cancel
Save