#OTHER by cg
authorClaus Gittinger <cg@exept.de>
Sun, 09 Oct 2016 11:30:17 +0200
changeset 20571 c158fb6ff2da
parent 20570 2e58e2877032
child 20572 46cece0d82ed
#OTHER by cg class: ExternalStream changed: #close avoid an already-closed exception, if stream gets closed inside the unregister.
ExternalStream.st
--- a/ExternalStream.st	Sun Oct 09 11:29:37 2016 +0200
+++ b/ExternalStream.st	Sun Oct 09 11:30:17 2016 +0200
@@ -1,5 +1,3 @@
-"{ Encoding: utf8 }"
-
 "
  COPYRIGHT (c) 1988 by Claus Gittinger
 	      All Rights Reserved
@@ -2218,7 +2216,9 @@
 
     self isOpen ifTrue:[
         self unregisterForFinalization.
-        self closeFile.
+        self isOpen ifTrue:[
+            self closeFile.
+        ].
     ].
 !
 
@@ -4620,7 +4620,7 @@
     "
         (FileStream newTemporary
             nextPutUtf16:$B;
-            nextPutUtf16:$Ä;
+            nextPutUtf16:$Ä;
             nextPutUtf16:(Character codePoint:16r10CCCC);
             reset;
             binary;
@@ -6572,7 +6572,7 @@
     ].
 
     "
-	'Bönnigheim' asUnicode16String errorPrintCR
+	'Bönnigheim' asUnicode16String errorPrintCR
     "
 !