diff options
author | Tony Tam <engineer.tonytam@pm.me> | 2022-01-02 00:39:19 -0800 |
---|---|---|
committer | Tony Tam <engineer.tonytam@pm.me> | 2022-01-02 00:39:19 -0800 |
commit | 4f59b0248b77f9825f81debb49dee421c4b2f29c (patch) | |
tree | 40b00ddc0f7a352ef5bcb30fdb31b8ff33119182 /core/src | |
parent | 15fe51747695c153f74267827edb18885d200ae3 (diff) | |
download | AntennaPod-4f59b0248b77f9825f81debb49dee421c4b2f29c.zip |
fix crash when not on network
Diffstat (limited to 'core/src')
-rw-r--r-- | core/src/main/java/de/danoeh/antennapod/core/util/NetworkUtils.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/core/src/main/java/de/danoeh/antennapod/core/util/NetworkUtils.java b/core/src/main/java/de/danoeh/antennapod/core/util/NetworkUtils.java index 46c1e7f4d..efc7845a4 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/util/NetworkUtils.java +++ b/core/src/main/java/de/danoeh/antennapod/core/util/NetworkUtils.java @@ -103,7 +103,8 @@ public class NetworkUtils { NetworkCapabilities capabilities = connManager.getNetworkCapabilities( connManager.getActiveNetwork()); - if (capabilities.hasTransport(NetworkCapabilities.TRANSPORT_WIFI) + if (capabilities != null + && capabilities.hasTransport(NetworkCapabilities.TRANSPORT_WIFI) && capabilities.hasTransport(NetworkCapabilities.TRANSPORT_VPN)) { return false; } |