Browse Source

Minor change

gingerBill 4 years ago
parent
commit
24c89b3eee
1 changed files with 3 additions and 0 deletions
  1. 3 0
      core/os/os2/file_stream.odin

+ 3 - 0
core/os/os2/file_stream.odin

@@ -10,6 +10,9 @@ file_to_stream :: proc(fd: Handle) -> (s: io.Stream) {
 
 
 @(private)
 @(private)
 error_to_io_error :: proc(ferr: Error) -> io.Error {
 error_to_io_error :: proc(ferr: Error) -> io.Error {
+	if ferr == nil {
+		return .None;
+	}
 	err, ok := ferr.(io.Error);
 	err, ok := ferr.(io.Error);
 	if !ok {
 	if !ok {
 		err = .Unknown;
 		err = .Unknown;