Skip to content

Commit

Permalink
cio: FIFOSet.Close() check if FIFOSet is nill to prevent NPE
Browse files Browse the repository at this point in the history
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
  • Loading branch information
thaJeztah committed Feb 1, 2021
1 parent 19ee068 commit 6a2d399
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cio/io.go
Expand Up @@ -80,7 +80,7 @@ type FIFOSet struct {

// Close the FIFOSet
func (f *FIFOSet) Close() error {
if f.close != nil {
if f != nil && f.close != nil {
return f.close()
}
return nil
Expand Down

0 comments on commit 6a2d399

Please sign in to comment.