check for NPE on badWays

This commit is contained in:
afischerdev 2023-07-31 10:24:14 +02:00
parent 03aab82e1e
commit 71dfbac13c

View file

@ -250,9 +250,11 @@ public final class VoiceHintProcessor {
if (input.cmd == VoiceHint.C && !input.goodWay.isLinktType()) {
int badWayPrio = 0;
if (input.badWays != null) {
for (MessageData md : input.badWays) {
badWayPrio = Math.max(badWayPrio, md.getPrio());
}
}
if (input.goodWay.getPrio() < badWayPrio) {
results.add(input);
} else {