mirror of
https://github.com/xcp-ng/xenadmin.git
synced 2024-11-27 02:56:01 +01:00
CA-122423: Fixed XenCenter error at XenAPI.VGPU_type.get_Capacity()
# HG changeset patch # User Mihaela Stoica <Mihaela.Stoica@citrix.com> # Date 1385635158 0 # Thu Nov 28 10:39:18 2013 +0000 # Node ID a760e46de0aad332bd24db705e329f8f718a6fef # Parent 5a4abff0407e1d2265ab34163c4f4a68d521649d Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
This commit is contained in:
parent
0cd255132f
commit
2548edeecb
@ -94,9 +94,11 @@ namespace XenAPI
|
||||
if (supported_on_PGPUs != null && supported_on_PGPUs.Count > 0)
|
||||
{
|
||||
PGPU pgpu = Connection.Resolve(supported_on_PGPUs[0]);
|
||||
if (pgpu.supported_VGPU_max_capacities != null && pgpu.supported_VGPU_max_capacities.Count > 0)
|
||||
if (pgpu != null && pgpu.supported_VGPU_max_capacities != null && pgpu.supported_VGPU_max_capacities.Count > 0)
|
||||
{
|
||||
capacity = pgpu.supported_VGPU_max_capacities[new XenRef<VGPU_type>(this)];
|
||||
var vgpuTypeRef = new XenRef<VGPU_type>(this);
|
||||
if (pgpu.supported_VGPU_max_capacities.ContainsKey(vgpuTypeRef))
|
||||
capacity = pgpu.supported_VGPU_max_capacities[vgpuTypeRef];
|
||||
}
|
||||
}
|
||||
return capacity;
|
||||
|
Loading…
Reference in New Issue
Block a user