diff options
author | tom-overton <tom.overton@outlook.com> | 2021-03-09 03:43:12 -0800 |
---|---|---|
committer | tom-overton <tom.overton@outlook.com> | 2021-03-09 03:43:12 -0800 |
commit | 4592613374834d4b600399131552cb82ffdac24b (patch) | |
tree | c5ffa7e21218a9a510502b32f8abdb8752711098 /src/com | |
parent | d8a728eec06ec45c41807c316c33f3476af6dd31 (diff) |
Gen 3: Fix crash when Limit Main-Game Legendaries is enabled in FRLG or Emerald
Diffstat (limited to 'src/com')
-rwxr-xr-x | src/com/dabomstew/pkrandom/romhandlers/Gen3RomHandler.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/com/dabomstew/pkrandom/romhandlers/Gen3RomHandler.java b/src/com/dabomstew/pkrandom/romhandlers/Gen3RomHandler.java index 1063902..fb15126 100755 --- a/src/com/dabomstew/pkrandom/romhandlers/Gen3RomHandler.java +++ b/src/com/dabomstew/pkrandom/romhandlers/Gen3RomHandler.java @@ -2588,7 +2588,10 @@ public class Gen3RomHandler extends AbstractGBRomHandler { @Override
public List<Integer> getMainGameLegendaries() {
- return Arrays.stream(romEntry.arrayEntries.get("MainGameLegendaries")).boxed().collect(Collectors.toList());
+ if (romEntry.arrayEntries.get("MainGameLegendaries") != null) {
+ return Arrays.stream(romEntry.arrayEntries.get("MainGameLegendaries")).boxed().collect(Collectors.toList());
+ }
+ return new ArrayList<>();
}
@Override
|