Skip to content

Commit 4106aa0

Browse files
anshulgangwardevdeep
authored andcommitted
CLOUDSTACK-6620: Fixed null pointer exception in hyperv agent in getting vmstats, when all vms are deleted from outside
1 parent 704f6d8 commit 4106aa0

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

  • plugins/hypervisors/hyperv/DotNet/ServerResource/HypervResource

‎plugins/hypervisors/hyperv/DotNet/ServerResource/HypervResource/WmiCallsV2.cs‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2685,6 +2685,10 @@ public KvpExchangeComponentSettingData GetKvpSettings(VirtualSystemSettingData v
26852685

26862686
public void GetSummaryInfo(Dictionary<string, VmStatsEntry> vmProcessorInfo, List<System.Management.ManagementPath> vmsToInspect)
26872687
{
2688+
if (vmsToInspect == null || vmsToInspect.Count == 0)
2689+
{
2690+
return;
2691+
}
26882692
// Process info available from WMI,
26892693
// See http://msdn.microsoft.com/en-us/library/hh850062(v=vs.85).aspx
26902694
uint[] requestedInfo = new uint[] { // TODO: correct?

0 commit comments

Comments
 (0)