Skip to content

Commit

Permalink
Fix NullPointerException when sourcefile is not available in dat
Browse files Browse the repository at this point in the history
  • Loading branch information
optyfr committed Sep 28, 2021
1 parent d747fd8 commit ed9ba1f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion JRomManager/src/jrm/profile/Profile.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import java.util.Set;
import java.util.TreeMap;
Expand Down Expand Up @@ -1721,7 +1722,7 @@ public void loadSystems()
machines.sort((a, b) -> a.getName().compareTo(b.getName()));
machines.forEach(systems::add);
srces.forEach((name, src) -> sources.add(src));
machineListList.get(0).forEach(m -> m.setSource(srces.get(m.getSourcefile())));
machineListList.get(0).stream().filter(m -> m.getSourcefile() != null).forEach(m -> m.setSource(srces.get(m.getSourcefile())));

final ArrayList<SoftwareList> softwarelists = new ArrayList<>();
machineListList.getSoftwareListList().forEach(softwarelists::add);
Expand Down

0 comments on commit ed9ba1f

Please sign in to comment.