mirror of
https://github.com/wneessen/go-mail.git
synced 2024-11-26 07:25:07 +01:00
Merge pull request #139 from wneessen/bugfix/138_segfault-in-writer-because-createpart-error-is-ignored
Fix nil pointer dereference in msgwriter due to missing error handling
This commit is contained in:
commit
05c2105705
1 changed files with 4 additions and 1 deletions
|
@ -231,7 +231,10 @@ func (mw *msgWriter) addFiles(fl []*File, a bool) {
|
|||
if mw.d > 0 {
|
||||
mw.newPart(f.Header)
|
||||
}
|
||||
mw.writeBody(f.Writer, e)
|
||||
|
||||
if mw.err == nil {
|
||||
mw.writeBody(f.Writer, e)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue