changeset 256:7ff9b9b0c16a

small fix for NPE
author robcast
date Mon, 11 Oct 2004 21:16:44 +0200
parents 95da3e44fdb9
children 85a0abfa1b8c
files servlet/src/digilib/image/ImageLoaderDocuImage.java
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/servlet/src/digilib/image/ImageLoaderDocuImage.java	Wed Aug 25 01:07:39 2004 +0200
+++ b/servlet/src/digilib/image/ImageLoaderDocuImage.java	Mon Oct 11 21:16:44 2004 +0200
@@ -467,8 +467,10 @@
 	public void dispose() {
 		// we must dispose the ImageReader because it keeps the filehandle
 		// open!
-		reader.dispose();
-		reader = null;
+		if (reader != null) {
+			reader.dispose();
+			reader = null;
+		}
 		img = null;
 	}