Skip to content

Commit 35109fe

Browse files
committed
added missing validation in process()
1 parent f726e63 commit 35109fe

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

streams/stream_impl.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,10 @@ func (s *Stream) process() IIterable {
330330
return s.parallelProcess(s.threads)
331331
}
332332

333-
var iterable = s.iterable
333+
iterable := s.iterable
334+
if iterable == nil {
335+
return nil
336+
}
334337
iterable = s.filter(iterable)
335338
iterable = s.sort(iterable)
336339
return iterable

0 commit comments

Comments
 (0)