Browse Source

Check for stream before closing.

woollybah 6 years ago
parent
commit
a65905e6f3
1 changed files with 4 additions and 1 deletions
  1. 4 1
      stream.mod/stream.bmx

+ 4 - 1
stream.mod/stream.bmx

@@ -485,7 +485,10 @@ Type TStreamWrapper Extends TStream
 	End Method
 
 	Method Close() Override
-		_stream.Close
+		If _stream Then
+			_stream.Close
+			_stream = Null
+		End If
 	End Method
 
 	Method Read:Long( buf:Byte Ptr,count:Long ) Override