mirror of
https://github.com/moonlight-stream/moonlight-android.git
synced 2025-07-19 11:03:01 +00:00
Handle the case where the MAC address cannot be retreived for some interface
This commit is contained in:
parent
7704ceb32b
commit
9b91543c2d
@ -49,7 +49,7 @@ public class NvConnection {
|
||||
* connecting over different interfaces */
|
||||
if (!iface.isLoopback()) {
|
||||
byte[] macAddress = iface.getHardwareAddress();
|
||||
if (macAddress.length == 6) {
|
||||
if (macAddress != null && macAddress.length == 6) {
|
||||
StringBuilder addrStr = new StringBuilder();
|
||||
for (int i = 0; i < macAddress.length; i++) {
|
||||
addrStr.append(String.format("%02x", macAddress[i]));
|
||||
|
Loading…
x
Reference in New Issue
Block a user