Index: src/java/org/apache/lucene/search/spell/SpellChecker.java
===================================================================
--- src/java/org/apache/lucene/search/spell/SpellChecker.java	(revision 612493)
+++ src/java/org/apache/lucene/search/spell/SpellChecker.java	(working copy)
@@ -284,7 +284,9 @@
    * @throws IOException
    */
   public void clearIndex() throws IOException {
-    IndexReader.unlock(spellIndex);
+    if (IndexReader.isLocked(spellIndex)){
+      IndexReader.unlock(spellIndex);
+    }
     IndexWriter writer = new IndexWriter(spellIndex, null, true);
     writer.close();
   }
@@ -308,7 +310,9 @@
    * @throws IOException
    */
   public void indexDictionary(Dictionary dict) throws IOException {
-    IndexReader.unlock(spellIndex);
+    if (IndexReader.isLocked(spellIndex)){
+      IndexReader.unlock(spellIndex);
+    }
     IndexWriter writer = new IndexWriter(spellIndex, new WhitespaceAnalyzer(),
         !IndexReader.indexExists(spellIndex));
     writer.setMergeFactor(300);
