check for NPE on badWays
This commit is contained in:
parent
03aab82e1e
commit
71dfbac13c
1 changed files with 4 additions and 2 deletions
|
@ -250,8 +250,10 @@ public final class VoiceHintProcessor {
|
||||||
|
|
||||||
if (input.cmd == VoiceHint.C && !input.goodWay.isLinktType()) {
|
if (input.cmd == VoiceHint.C && !input.goodWay.isLinktType()) {
|
||||||
int badWayPrio = 0;
|
int badWayPrio = 0;
|
||||||
for (MessageData md : input.badWays) {
|
if (input.badWays != null) {
|
||||||
badWayPrio = Math.max(badWayPrio, md.getPrio());
|
for (MessageData md : input.badWays) {
|
||||||
|
badWayPrio = Math.max(badWayPrio, md.getPrio());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (input.goodWay.getPrio() < badWayPrio) {
|
if (input.goodWay.getPrio() < badWayPrio) {
|
||||||
results.add(input);
|
results.add(input);
|
||||||
|
|
Loading…
Reference in a new issue