mirror of
https://github.com/xcp-ng/xenadmin.git
synced 2024-11-25 06:16:37 +01:00
add some check when resolving a reference
This commit is contained in:
parent
530462ad41
commit
3ec5805464
@ -57,8 +57,14 @@ namespace XenAPI
|
||||
}
|
||||
else if(sriov_logical_PIF_of.Count != 0)
|
||||
{
|
||||
if (Connection == null)
|
||||
return "";
|
||||
Network_sriov network_s = Connection.Resolve(sriov_logical_PIF_of[0]);
|
||||
if (network_s == null)
|
||||
return "";
|
||||
PIF pif = Connection.Resolve(network_s.physical_PIF);
|
||||
if (pif == null)
|
||||
return "";
|
||||
return pif.Name();
|
||||
}
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user