2
0
mirror of https://github.com/KDE/kdeconnect-android synced 2025-08-31 06:05:12 +00:00

Fixing crash, apparently info can be null (?)

This commit is contained in:
Albert Vaca
2017-05-16 20:57:06 +02:00
parent ee336aa414
commit 9a5b03c423

View File

@@ -23,6 +23,9 @@ public class NetworkHelper {
Network[] networks = connMgr.getAllNetworks();
for (Network network : networks) {
NetworkInfo info = connMgr.getNetworkInfo(network);
if (info == null) {
continue;
}
if (info.getType() == ConnectivityManager.TYPE_MOBILE) {
mobile = info.isConnected();
continue;