diff --git a/XenAdmin/Wizards/PatchingWizard/PatchingWizard_SelectServers.cs b/XenAdmin/Wizards/PatchingWizard/PatchingWizard_SelectServers.cs index c79c4d10e..641cece99 100644 --- a/XenAdmin/Wizards/PatchingWizard/PatchingWizard_SelectServers.cs +++ b/XenAdmin/Wizards/PatchingWizard/PatchingWizard_SelectServers.cs @@ -290,7 +290,7 @@ namespace XenAdmin.Wizards.PatchingWizard var firstCheckedRow = dataGridViewHosts.Rows.Cast().FirstOrDefault(row => row.CheckValue > UNCHECKED); if (firstCheckedRow == null) return null; - return firstCheckedRow.Tag as Host ?? Helpers.GetMaster(((IXenObject)firstCheckedRow.Tag).Connection); + return firstCheckedRow.Tag as Host ?? Helpers.GetMaster(firstCheckedRow.Tag as Pool); } private void disableNotApplicableHosts(PatchingHostsDataGridViewRow row, List applicableHosts, Host host) @@ -601,7 +601,7 @@ namespace XenAdmin.Wizards.PatchingWizard { foreach (PatchingHostsDataGridViewRow row in dataGridViewHosts.Rows) { - var host = row.IsAHostRow ? row.Tag as Host : Helpers.GetMaster(((IXenObject) row.Tag).Connection); + var host = row.Tag as Host ?? Helpers.GetMaster(row.Tag as Pool); if (host != null) EnabledRow(host, SelectedUpdateType, row.Index); }