Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 673275cb authored by Jean Chalard's avatar Jean Chalard
Browse files

Fix an NPE.

Apparently, it is possible that File#getPath() returns null.
In this case, we'll have a null AssetFileAddress and an NPE
later down the road.

Bug: 9944824
Change-Id: Id6ceac1cb55439660f9811cf0fe3b574200d5a20
parent 9b78241d
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -286,7 +286,8 @@ final public class BinaryDictionaryGetter {
            }
            }
            if (!dictPackSettings.isWordListActive(wordListId)) continue;
            if (!dictPackSettings.isWordListActive(wordListId)) continue;
            if (canUse) {
            if (canUse) {
                fileList.add(AssetFileAddress.makeFromFileName(f.getPath()));
                final AssetFileAddress afa = AssetFileAddress.makeFromFileName(f.getPath());
                if (null != afa) fileList.add(afa);
            } else {
            } else {
                Log.e(TAG, "Found a cached dictionary file but cannot read or use it");
                Log.e(TAG, "Found a cached dictionary file but cannot read or use it");
            }
            }