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
No known key found for this signature in database
GPG Key ID: FDE7BE0E88F5E48
1 changed files with
3 additions and
0 deletions
-
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 |
|
|
|
} |
|
|
|
|
|
|
|