LUCENE-1199: do defensive check of indexReader != null before trying to close it

git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@632879 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael McCandless 2008-03-02 23:34:40 +00:00
parent 3efa1c47ca
commit 33bee3c60c
1 changed files with 1 additions and 1 deletions

View File

@ -571,7 +571,7 @@ public class IndexModifier {
if (indexWriter != null) {
indexWriter.close();
indexWriter = null;
} else {
} else if (indexReader != null) {
indexReader.close();
indexReader = null;
}