summaryrefslogtreecommitdiff
path: root/app/src/main/java/se/leap
diff options
context:
space:
mode:
authorcyBerta <cyberta@riseup.net>2022-02-05 05:06:42 +0100
committercyBerta <cyberta@riseup.net>2022-02-05 05:06:56 +0100
commit2375f6a9f2ec395391cca524176d9c54635a14de (patch)
tree971b985f24498d6488c41caba252f64395f25b2f /app/src/main/java/se/leap
parent1c605888bab7d7ebed2a401b90a018a8e109e7e2 (diff)
fix NPE in GatewaysManager
Diffstat (limited to 'app/src/main/java/se/leap')
-rw-r--r--app/src/main/java/se/leap/bitmaskclient/eip/GatewaysManager.java3
1 files changed, 3 insertions, 0 deletions
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));
}