Commit ce2c0e73 authored by 汪洋's avatar 汪洋

修复getMacAddress可能返回nil的情况

parent b00f687e
......@@ -363,7 +363,8 @@
NSString *outstring = [NSString stringWithFormat:@"%02x%02x%02x%02x%02x%02x", *ptr, *(ptr+1), *(ptr+2), *(ptr+3), *(ptr+4), *(ptr+5)];
free(buf);
return [outstring uppercaseString];
NSString *result = [outstring uppercaseString];
return result ?: @"";
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment