fix: AESThemeUtil.init(null) NullPointerException 闪退修复

AESThemeUtil.init(null) 传入 null 时,Java 值传递导致
fillThemeStyleIDList 内部 new ArrayList 仅赋值给局部变量,
调用方 themeStyleIDList 仍为 null,随后的 addAll(null) 抛 NPE。

在 init() 中先创建新 ArrayList 再传入 fillThemeStyleIDList 以修复。
This commit is contained in:
2026-06-02 01:59:15 +08:00
parent 6bc3cbe446
commit 981a8dd8cd
3 changed files with 5 additions and 4 deletions

View File

@@ -34,6 +34,7 @@ public class AESThemeUtil {
*/
public static void init(ArrayList<Integer> themeStyleIDList) {
if(themeStyleIDList == null) {
themeStyleIDList = new ArrayList<Integer>();
AESThemeBean.fillThemeStyleIDList(themeStyleIDList);
}
AESThemeUtil.themeStyleIDList.clear();