diff --git a/OsmAnd/src/net/osmand/plus/voice/JSMediaCommandPlayerImpl.java b/OsmAnd/src/net/osmand/plus/voice/JSMediaCommandPlayerImpl.java index 80fd5381ab..fd9caafe2c 100644 --- a/OsmAnd/src/net/osmand/plus/voice/JSMediaCommandPlayerImpl.java +++ b/OsmAnd/src/net/osmand/plus/voice/JSMediaCommandPlayerImpl.java @@ -90,9 +90,12 @@ public class JSMediaCommandPlayerImpl extends MediaCommandPlayerImpl { if (voiceDir.getName().contains("tts")) { return false; } - for (File f : voiceDir.listFiles()) { - if (f.getName().endsWith(IndexConstants.TTSVOICE_INDEX_EXT_JS)) { - return true; + File[] files = voiceDir.listFiles(); + if (files != null) { + for (File f : files) { + if (f.getName().endsWith(IndexConstants.TTSVOICE_INDEX_EXT_JS)) { + return true; + } } } return false;