os: be consistent about File methods with nil receivers
Some crashed, some didn't. Make a nil receiver always return ErrInvalid rather than crash. Fixes #5824. The program in the bug listing is silent now, at least on my Mac. R=golang-dev, adg CC=golang-dev https://golang.org/cl/13108044
Showing
Please
register
or
sign in
to comment