From 46af1e2f1ec54f44940d72de3c2cb0bc6acccc43 Mon Sep 17 00:00:00 2001 From: Lulonaut <67191924+Lulonaut@users.noreply.github.com> Date: Wed, 22 Jun 2022 14:41:33 +0200 Subject: fairy crash (#171) --- .../io/github/moulberry/notenoughupdates/miscfeatures/FairySouls.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/FairySouls.java b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/FairySouls.java index a3717f32..75f1b427 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/FairySouls.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/FairySouls.java @@ -323,6 +323,9 @@ public class FairySouls { //noinspection UnstableApiUsage Type multiProfileSoulsType = new TypeToken>>>() {}.getType(); allProfilesFoundSouls = gson.fromJson(fileContent, multiProfileSoulsType); + if (allProfilesFoundSouls == null){ + allProfilesFoundSouls = new HashMap<>(); + } } catch (JsonSyntaxException e) { //The file is in the old format, convert it to the new one and set the profile to unknown try { -- cgit