Quellcode durchsuchen
plugins/base: Add missing nil check for getMailboxByType
Fixes panic if there is no usable Sent folder.
master
fox.cpp
vor 4 Jahren
committed by
Simon Ser
Ursprung
Commit
62910a94fb
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: FDE7BE0E88F5E48
1 geänderte Dateien mit
3 neuen und
0 gelöschten Zeilen
-
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 |
|
|
|
} |
|
|
|
|
|
|
|