check for NPE on config
This commit is contained in:
parent
71dfbac13c
commit
2dbb57dd4e
1 changed files with 7 additions and 2 deletions
|
@ -845,8 +845,13 @@ public class BRouterView extends View {
|
||||||
for (int i = 0; i < 6; i++) {
|
for (int i = 0; i < 6; i++) {
|
||||||
if (checkedModes[i]) {
|
if (checkedModes[i]) {
|
||||||
writeRawTrackToMode(routingModes[i]);
|
writeRawTrackToMode(routingModes[i]);
|
||||||
String s = map.get(routingModes[i]).params;
|
ServiceModeConfig sm = map.get(routingModes[i]);
|
||||||
String p = map.get(routingModes[i]).profile;
|
String s = null;
|
||||||
|
String p = null;
|
||||||
|
if (sm != null) {
|
||||||
|
s = sm.params;
|
||||||
|
p = sm.profile;
|
||||||
|
}
|
||||||
if (s == null || !p.equals(profileName)) s = "noparams";
|
if (s == null || !p.equals(profileName)) s = "noparams";
|
||||||
ServiceModeConfig smc = new ServiceModeConfig(routingModes[i], profileName, s);
|
ServiceModeConfig smc = new ServiceModeConfig(routingModes[i], profileName, s);
|
||||||
for (OsmNodeNamed nogo : nogoVetoList) {
|
for (OsmNodeNamed nogo : nogoVetoList) {
|
||||||
|
|
Loading…
Reference in a new issue