From 2375f6a9f2ec395391cca524176d9c54635a14de Mon Sep 17 00:00:00 2001 From: cyBerta Date: Sat, 5 Feb 2022 05:06:42 +0100 Subject: fix NPE in GatewaysManager --- app/src/main/java/se/leap/bitmaskclient/eip/GatewaysManager.java | 3 +++ 1 file changed, 3 insertions(+) (limited to 'app/src/main/java/se') diff --git a/app/src/main/java/se/leap/bitmaskclient/eip/GatewaysManager.java b/app/src/main/java/se/leap/bitmaskclient/eip/GatewaysManager.java index 060e69f2..0dd4c26c 100644 --- a/app/src/main/java/se/leap/bitmaskclient/eip/GatewaysManager.java +++ b/app/src/main/java/se/leap/bitmaskclient/eip/GatewaysManager.java @@ -211,6 +211,9 @@ public class GatewaysManager { public Load getLoadForLocation(@Nullable String name, TransportType transportType) { Location location = getLocation(name); + if (location == null) { + return Load.UNKNOWN; + } return Load.getLoadByValue(location.getAverageLoad(transportType)); } -- cgit v1.2.3