Merge pull request #1960 from jdmcnair/develop

Fix for failed update-info parse crash (issue #1959)
This commit is contained in:
Dimitrij
2021-06-17 13:13:28 +01:00
committed by GitHub

View File

@@ -1,4 +1,4 @@
using System;
using System;
using System.IO;
using System.Net;
using System.ComponentModel;
@@ -245,12 +245,19 @@ namespace mRemoteNG.App.Update
if (!e.Cancelled && e.Error == null)
{
CurrentUpdateInfo = UpdateInfo.FromString(e.Result);
Settings.Default.CheckForUpdatesLastCheck = DateTime.UtcNow;
if (!Settings.Default.UpdatePending)
try
{
Settings.Default.UpdatePending = IsUpdateAvailable();
CurrentUpdateInfo = UpdateInfo.FromString(e.Result);
Settings.Default.CheckForUpdatesLastCheck = DateTime.UtcNow;
if (!Settings.Default.UpdatePending)
{
Settings.Default.UpdatePending = IsUpdateAvailable();
}
}
catch (Exception ex)
{
e = NewDownloadStringCompletedEventArgs(e.Result, ex, e.Cancelled, null);
}
}