diff --git a/android/vcmi-app/src/main/java/eu/vcmi/vcmi/util/FileUtil.java b/android/vcmi-app/src/main/java/eu/vcmi/vcmi/util/FileUtil.java index 49b731425..887c8ba9c 100644 --- a/android/vcmi-app/src/main/java/eu/vcmi/vcmi/util/FileUtil.java +++ b/android/vcmi-app/src/main/java/eu/vcmi/vcmi/util/FileUtil.java @@ -99,7 +99,7 @@ public class FileUtil public static boolean clearDirectory(final File dir) { - if (dir == null) + if (dir == null || dir.listFiles() == null) { Log.e("Broken path given to fileutil::clearDirectory"); return false;