Skip to content

Commit

Permalink
fix nil pointer panic (#19)
Browse files Browse the repository at this point in the history
  • Loading branch information
schoren authored Jul 12, 2024
1 parent 6e1f247 commit b77b778
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -769,6 +769,9 @@ func (d *Dialer) GetEmails(uids ...int) (emails map[int]*Email, err error) {
}

if success {
if emails[e.UID] == nil {
emails[e.UID] = &Email{UID: e.UID}
}
emails[e.UID].Subject = e.Subject
emails[e.UID].From = e.From
emails[e.UID].ReplyTo = e.ReplyTo
Expand Down

0 comments on commit b77b778

Please sign in to comment.