Tweak cgozlib to be consistent with cgozstd
@@ -134,12 +134,12 @@ func (r *Reader) Reset(reader io.Reader, dictionary []byte) error {
if r == nil {
return errNilReceiver
}
- if reader == nil {
- return errNilIOReader
- }
if err := r.Close(); err != nil {
return err
}
+ if reader == nil {
+ return errNilIOReader
+ }
if e := C.cgozlib_inflateInit(&r.z); e != 0 {
return errCode(e)
