cio: FIFOSet.Close() check if FIFOSet is nill to prevent NPE

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn 2021-01-29 12:09:50 +01:00
parent 19ee068f93
commit 6a2d3990d1
No known key found for this signature in database
GPG Key ID: 76698F39D527CE8C

View File

@ -80,7 +80,7 @@ type FIFOSet struct {
// Close the FIFOSet // Close the FIFOSet
func (f *FIFOSet) Close() error { func (f *FIFOSet) Close() error {
if f.close != nil { if f != nil && f.close != nil {
return f.close() return f.close()
} }
return nil return nil