CA-289959: Add null checks when resolving the updates which require reboot

Signed-off-by: Mihaela Stoica <mihaela.stoica@citrix.com>
This commit is contained in:
Mihaela Stoica 2018-05-17 11:25:07 +01:00 committed by Konstantina Chremmou
parent 171284ff34
commit 5ad2aa302e
2 changed files with 3 additions and 2 deletions

View File

@ -70,7 +70,7 @@ namespace XenAdmin.Diagnostics.Checks
var update = Host.Connection.Resolve(updateRef);
if (string.IsNullOrEmpty(UpdateUuid) || //automated mode, any update
string.Equals(update.uuid, UpdateUuid, System.StringComparison.InvariantCultureIgnoreCase)) //normal mode the given update
(update != null && string.Equals(update.uuid, UpdateUuid, System.StringComparison.InvariantCultureIgnoreCase))) //normal mode the given update
{
return new MasterIsPendingRestartHostProblem(this, pool);
}

View File

@ -1820,7 +1820,8 @@ namespace XenAdmin.TabPages
foreach (var updateRef in updateRefs)
{
var update = host.Connection.Resolve(updateRef);
warnings.Add(CreateWarningRow(host, update));
if (update != null)
warnings.Add(CreateWarningRow(host, update));
}
// For Toolstack restart, legacy code has to be used to determine this - pool_patches are still populated for backward compatibility