check for NPE on config

This commit is contained in:
afischerdev 2023-07-31 10:25:58 +02:00
parent 71dfbac13c
commit 2dbb57dd4e

View file

@ -845,8 +845,13 @@ public class BRouterView extends View {
for (int i = 0; i < 6; i++) {
if (checkedModes[i]) {
writeRawTrackToMode(routingModes[i]);
String s = map.get(routingModes[i]).params;
String p = map.get(routingModes[i]).profile;
ServiceModeConfig sm = map.get(routingModes[i]);
String s = null;
String p = null;
if (sm != null) {
s = sm.params;
p = sm.profile;
}
if (s == null || !p.equals(profileName)) s = "noparams";
ServiceModeConfig smc = new ServiceModeConfig(routingModes[i], profileName, s);
for (OsmNodeNamed nogo : nogoVetoList) {