fix for failed update-info parse crash

This commit is contained in:
Jason McNair
2021-05-14 18:32:56 -04:00
parent 2cf5a4317d
commit 95b81193e7

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);
}
}