Skip to content

Commit 88e9554

Browse files
committed
esign.go: added nil check of UploadFile.Close()
1 parent f759c2c commit 88e9554

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

esign.go

+4-2
Original file line numberDiff line numberDiff line change
@@ -288,8 +288,10 @@ type UploadFile struct {
288288

289289
// Close closes the io.Reader if an io.Closer.
290290
func (uf *UploadFile) Close() {
291-
if closer, ok := uf.Reader.(io.Closer); ok {
292-
closer.Close()
291+
if uf != nil {
292+
if closer, ok := uf.Reader.(io.Closer); ok {
293+
closer.Close()
294+
}
293295
}
294296
}
295297

0 commit comments

Comments
 (0)