瀏覽代碼

plugins/base: Add missing nil check for getMailboxByType

Fixes panic if there is no usable Sent folder.
master
fox.cpp 4 年之前
committed by Simon Ser
父節點
當前提交
62910a94fb
沒有發現已知的金鑰在資料庫的簽署中 GPG Key ID: FDE7BE0E88F5E48
共有 1 個文件被更改,包括 3 次插入0 次删除
  1. +3
    -0
      plugins/base/imap.go

+ 3
- 0
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
}



Loading…
取消
儲存