Parcourir la source
plugins/base: Add missing nil check for getMailboxByType
Fixes panic if there is no usable Sent folder.
master
fox.cpp
il y a 4 ans
committed by
Simon Ser
Parent
révision
62910a94fb
Aucune clé connue n'a été trouvée dans la base pour cette signature
ID de la clé GPG: FDE7BE0E88F5E48
1 fichiers modifiés avec
3 ajouts et
0 suppressions
-
plugins/base/imap.go
|
|
@@ -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 |
|
|
|
} |
|
|
|
|
|
|
|