mirror of
https://github.com/xcp-ng/xenadmin.git
synced 2025-01-20 15:29:26 +01:00
Merge pull request #419 from stephen-turner/CA-165096
CA-165096: Add null reference check
This commit is contained in:
commit
fe97f617ca
@ -359,7 +359,7 @@ namespace XenAdmin.ConsoleView
|
||||
XenAPI.Network network = vif.Connection.Resolve(vif.network);
|
||||
XenAPI.Host host = vm.Connection.Resolve(vm.resident_on);
|
||||
XenAPI.PIF pif = Helpers.FindPIF(network, host);
|
||||
if (pif.LinkStatus == PIF.LinkState.Connected)
|
||||
if (pif != null && pif.LinkStatus == PIF.LinkState.Connected)
|
||||
{
|
||||
foreach (var networkInfo in networks.Where(n => n.Key.StartsWith(String.Format("{0}/ip", vif.device))))
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user