Kaynağa Gözat

plugins/base: Add missing nil check for getMailboxByType

Fixes panic if there is no usable Sent folder.
master
fox.cpp 4 yıl önce
committed by Simon Ser
ebeveyn
işleme
62910a94fb
Veri tabanında bu imza için bilinen anahtar bulunamadı GPG Anahtar Kimliği: FDE7BE0E88F5E48
1 değiştirilmiş dosya ile 3 ekleme ve 0 silme
  1. +3
    -0
      plugins/base/imap.go

+ 3
- 0
plugins/base/imap.go Dosyayı Görüntüle

@@ -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
}



Yükleniyor…
İptal
Kaydet