changeset 330:f980ea238e72

it is possible for "this.istr" to be null before this method is called, so we should check for it before attempting to close the stream
author Craig Slusher <cslush@gmail.com>
date Mon, 26 Jan 2009 10:46:51 -0500
parents 7044a26f299e
children 27479f54069d
files dwt/dwthelper/BufferedInputStream.d
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/dwt/dwthelper/BufferedInputStream.d	Fri Jan 02 18:08:02 2009 -0800
+++ b/dwt/dwthelper/BufferedInputStream.d	Mon Jan 26 10:46:51 2009 -0500
@@ -98,7 +98,9 @@
     }
 
     public void close(){
-        this.istr.close();
+        if (this.istr !is null) {
+            this.istr.close();
+        }
     }