Fixed crash occurring on closing the PatchingWizard if the user uploaded a legacy patch and then went back to select and install an update.
Fixed crash occurring on closing the PatchingWizard if the user uploaded a
legacy patch and then went back to select and install an update.

The code was removing all the uploaded legacy patches except the installed
ones. In this case the installed legacy patch is null hence all the already
uploaded patches need to be removed.

Signed-off-by: Konstantina Chremmou <a7d1f757a659045fb6db8c1e3849a1c8ad00b97a@citrix.com>

minli1/xenadmin,minli1/xenadmin,minli1/xenadmin,MihaelaStoica/xenadmin,xenserver/xenadmin,kc284/xenadmin,kc284/xenadmin,kc284/xenadmin,kc284/xenadmin,xenserver/xenadmin,MihaelaStoica/xenadmin,kc284/xenadmin,MihaelaStoica/xenadmin,minli1/xenadmin,MihaelaStoica/xenadmin,xenserver/xenadmin,MihaelaStoica/xenadmin,MihaelaStoica/xenadmin,minli1/xenadmin,minli1/xenadmin