Merge pull request #88 from MihaelaStoica/CA-137237

Fixed XenCenter fatal exception when rebuilding alertList
This commit is contained in:
Stephen Turner 2014-06-09 11:49:44 +01:00
commit dd6c1eccde

View File

@ -511,8 +511,15 @@ namespace XenAdmin.Core
TimeSpan timeDiff = h.LicenseExpiryUTC.Subtract(referenceDate);
if (timeDiff.TotalDays < 3653)
return DateTimeToString(h.LicenseExpiryUTC.ToLocalTime(),
longFormat ? Messages.DATEFORMAT_DMY_LONG : Messages.DATEFORMAT_DMY, true);
{
var expiryString = "";
Program.Invoke(Program.MainWindow, delegate
{
expiryString = DateTimeToString(h.LicenseExpiryUTC.ToLocalTime(),
longFormat ? Messages.DATEFORMAT_DMY_LONG : Messages.DATEFORMAT_DMY, true);
});
return expiryString;
}
return Messages.LICENSE_NEVER;
}