Merge branch '2495-npe-get-network-interfaces' into 'master'

Don't crash when NetworkInterface.getNetworkInterfaces() throws NPE

Closes #2495

See merge request fdroid/fdroidclient!1163
This commit is contained in:
Hans-Christoph Steiner
2022-12-15 16:28:27 +00:00

View File

@@ -346,7 +346,8 @@ public class WifiStateChangeService extends Worker {
}
}
}
} catch (SocketException e) {
} catch (NullPointerException | SocketException e) {
// NetworkInterface.getNetworkInterfaces() can throw a NullPointerException internally
Log.e(TAG, "Could not get ip address", e);
}
}