CLOUDSTACK-6620: Fixed null pointer exception in hyperv agent in getting vmstats, when all vms are deleted from outside

This commit is contained in:
Anshul Gangwar 2014-05-09 14:49:32 +05:30 committed by Devdeep Singh
parent 7916542d99
commit b82e26253c
1 changed files with 4 additions and 0 deletions

View File

@ -2685,6 +2685,10 @@ namespace HypervResource
public void GetSummaryInfo(Dictionary<string, VmStatsEntry> vmProcessorInfo, List<System.Management.ManagementPath> vmsToInspect)
{
if (vmsToInspect == null || vmsToInspect.Count == 0)
{
return;
}
// Process info available from WMI,
// See http://msdn.microsoft.com/en-us/library/hh850062(v=vs.85).aspx
uint[] requestedInfo = new uint[] { // TODO: correct?