Forráskód Böngészése

Check for stream before closing.

woollybah 6 éve
szülő
commit
a65905e6f3
1 módosított fájl, 4 hozzáadás és 1 törlés
  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