Added null reference check in Upload Page.

This commit is contained in:
Carmen Agimof 2015-07-21 11:40:45 +01:00
parent 2720d1bc23
commit 037acfc889

View File

@ -377,7 +377,10 @@ namespace XenAdmin.Wizards.PatchingWizard
if (action is DownloadAndUnzipXenServerPatchAction)
{
SelectedNewPatch = ((DownloadAndUnzipXenServerPatchAction)action).PatchPath;
AllDownloadedPatches.Add((SelectedUpdateAlert as XenServerPatchAlert).Patch.Uuid, SelectedNewPatch);
if (SelectedUpdateAlert is XenServerPatchAlert && (SelectedUpdateAlert as XenServerPatchAlert).Patch != null)
{
AllDownloadedPatches.Add((SelectedUpdateAlert as XenServerPatchAlert).Patch.Uuid, SelectedNewPatch);
}
_patch = null;
PrepareUploadActions();
TryUploading();