From d870cdbc00c3d36f00af66ef730596f4a956ee10 Mon Sep 17 00:00:00 2001 From: ZaneYork Date: Thu, 2 Apr 2020 16:05:29 +0800 Subject: [PATCH] Bug fix --- .../com/zane/smapiinstaller/logic/ModAssetsManager.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/com/zane/smapiinstaller/logic/ModAssetsManager.java b/app/src/main/java/com/zane/smapiinstaller/logic/ModAssetsManager.java index 5962134..217bd66 100644 --- a/app/src/main/java/com/zane/smapiinstaller/logic/ModAssetsManager.java +++ b/app/src/main/java/com/zane/smapiinstaller/logic/ModAssetsManager.java @@ -73,7 +73,11 @@ public class ModAssetsManager { File currentFile = files.poll(); if (currentFile != null && currentFile.exists()) { boolean foundManifest = false; - for (File file : currentFile.listFiles(File::isFile)) { + File[] listFiles = currentFile.listFiles(File::isFile); + if (listFiles == null) { + continue; + } + for (File file : listFiles) { if (StringUtils.equalsIgnoreCase(file.getName(), "manifest.json")) { ModManifestEntry manifest = FileUtils.getFileJson(file, ModManifestEntry.class); foundManifest = true;