Skip to content

Commit bf755cd

Browse files
committed
Fix nil pointer deref in part_test.go
1 parent e909bd5 commit bf755cd

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

part_test.go

+1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ func TestPartEncoding(t *testing.T) {
1919
part := m.newPart(TypeTextPlain, WithPartEncoding(tt.enc), nil)
2020
if part == nil {
2121
t.Errorf("newPart() WithPartEncoding() failed: no part returned")
22+
return
2223
}
2324
if part.enc.String() != tt.want {
2425
t.Errorf("newPart() WithPartEncoding() failed: expected encoding: %s, got: %s", tt.want,

0 commit comments

Comments
 (0)