Fix npe
This commit is contained in:
parent
ddaaaa6d43
commit
2fbdb121e4
1 changed files with 6 additions and 3 deletions
|
@ -90,11 +90,14 @@ public class JSMediaCommandPlayerImpl extends MediaCommandPlayerImpl {
|
|||
if (voiceDir.getName().contains("tts")) {
|
||||
return false;
|
||||
}
|
||||
for (File f : voiceDir.listFiles()) {
|
||||
File[] files = voiceDir.listFiles();
|
||||
if (files != null) {
|
||||
for (File f : files) {
|
||||
if (f.getName().endsWith(IndexConstants.TTSVOICE_INDEX_EXT_JS)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue