mirror of
https://github.com/xcp-ng/xenadmin.git
synced 2025-01-20 07:19:18 +01:00
CA-226112: Disable PVS read caching causes System.NullReferenceException
Signed-off-by: Mihaela Stoica <mihaela.stoica@citrix.com>
This commit is contained in:
parent
1040027a6d
commit
994ced8388
@ -97,8 +97,7 @@ namespace XenAdmin.Commands
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
private AsyncAction GetAsyncActionForVm(VM vm)
|
private AsyncAction GetAsyncActionForVm(VM vm)
|
||||||
{
|
{
|
||||||
var pvsProxy = vm.Connection.Cache.PVS_proxies.FirstOrDefault(p => p.VM.Equals(vm)); // null if no proxy
|
var pvsProxy = vm.PvsProxy;
|
||||||
|
|
||||||
if (pvsProxy == null) return null; // No proxy to disable
|
if (pvsProxy == null) return null; // No proxy to disable
|
||||||
|
|
||||||
return new PvsProxyDestroyAction(pvsProxy);
|
return new PvsProxyDestroyAction(pvsProxy);
|
||||||
|
@ -139,9 +139,7 @@ namespace XenAdmin.Dialogs
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
private bool PvsProxyAlreadyEnabled(VM vm)
|
private bool PvsProxyAlreadyEnabled(VM vm)
|
||||||
{
|
{
|
||||||
var pvsProxies = vm.Connection.Cache.PVS_proxies;
|
return vm.PvsProxy != null;
|
||||||
|
|
||||||
return pvsProxies.Any(pvsProxy => pvsProxy.VM.Equals(vm));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
Loading…
Reference in New Issue
Block a user