diff src/org/tmatesoft/hg/internal/LineReader.java @ 483:e31e85cf4d4c

Handle include and unset directives in config files
author Artem Tikhomirov <tikhomirov.artem@gmail.com>
date Tue, 07 Aug 2012 19:14:53 +0200
parents f3fab7a20841
children 9edfd5a223b8
line wrap: on
line diff
--- a/src/org/tmatesoft/hg/internal/LineReader.java	Tue Aug 07 14:27:13 2012 +0200
+++ b/src/org/tmatesoft/hg/internal/LineReader.java	Tue Aug 07 19:14:53 2012 +0200
@@ -109,10 +109,12 @@
 			} catch (IOException ex) {
 				throw new HgInvalidFileException(ex.getMessage(), ex, file);
 			} finally {
-				try {
-					statusFileReader.close();
-				} catch (IOException ex) {
-					log.dump(MqManager.class, Warn, ex, null);
+				if (statusFileReader != null) {
+					try {
+						statusFileReader.close();
+					} catch (IOException ex) {
+						log.dump(MqManager.class, Warn, ex, null);
+					}
 				}
 //				try {
 //					consumer.end(file, paramObj);