diff options
Diffstat (limited to 'src/pkg/os/stat_windows.go')
-rw-r--r-- | src/pkg/os/stat_windows.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/pkg/os/stat_windows.go b/src/pkg/os/stat_windows.go index 8394c2b32..6dc386685 100644 --- a/src/pkg/os/stat_windows.go +++ b/src/pkg/os/stat_windows.go @@ -12,6 +12,9 @@ import ( // Stat returns the FileInfo structure describing file. // If there is an error, it will be of type *PathError. func (file *File) Stat() (fi FileInfo, err error) { + if file == nil { + return nil, ErrInvalid + } if file == nil || file.fd < 0 { return nil, syscall.EINVAL } |