Commit 88d15150 authored by Geoffrey Métais's avatar Geoffrey Métais
Browse files

Prevent NPE

CID #1226305
parent 8031491c
...@@ -144,8 +144,10 @@ public class AudioUtil { ...@@ -144,8 +144,10 @@ public class AudioUtil {
private static void deleteContent(File dir, boolean deleteDir) { private static void deleteContent(File dir, boolean deleteDir) {
if (dir.isDirectory()) { if (dir.isDirectory()) {
File[] files = dir.listFiles(); File[] files = dir.listFiles();
for (File file : files) { if (files != null && files.length > 0) {
deleteContent(file, true); for (File file : files) {
deleteContent(file, true);
}
} }
} }
if (deleteDir) if (deleteDir)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment