Skip to content

Commit 0786ec1

Browse files
committed
Null exception fixed
1 parent 585d2e6 commit 0786ec1

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

Source/NETworkManager/Models/Network/IPScanner.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,12 @@ public void ScanAsync(IPAddress[] ipAddresses, IPScannerOptions ipScannerOptions
117117

118118
// Vendor lookup
119119
if (macAddress != null)
120-
vendor = OUILookup.Lookup(macAddress.ToString()).FirstOrDefault().Vendor;
120+
{
121+
OUIInfo info = OUILookup.Lookup(macAddress.ToString()).FirstOrDefault();
122+
123+
if (info != null)
124+
vendor = info.Vendor;
125+
}
121126
}
122127

123128
OnHostFound(new IPScannerHostFoundArgs(pingInfo, hostname, macAddress, vendor));

0 commit comments

Comments
 (0)