diff options
Diffstat (limited to 'java/src/com/android/inputmethod/latin/makedict/BinaryDictIOUtils.java')
-rw-r--r-- | java/src/com/android/inputmethod/latin/makedict/BinaryDictIOUtils.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/java/src/com/android/inputmethod/latin/makedict/BinaryDictIOUtils.java b/java/src/com/android/inputmethod/latin/makedict/BinaryDictIOUtils.java index 07ba777c7..0dc50d14e 100644 --- a/java/src/com/android/inputmethod/latin/makedict/BinaryDictIOUtils.java +++ b/java/src/com/android/inputmethod/latin/makedict/BinaryDictIOUtils.java @@ -309,6 +309,7 @@ public final class BinaryDictIOUtils { * @param file The file to read. * @param offset The offset in the file where to start reading the data. * @param length The length of the data file. + * @return the header of the specified dictionary file. */ private static FileHeader getDictionaryFileHeader( final File file, final long offset, final long length) @@ -330,6 +331,9 @@ public final class BinaryDictIOUtils { } } ); + if (dictDecoder == null) { + return null; + } return dictDecoder.readHeader(); } |