Fixed: Issue where an exception was thrown at start when there was no internet connection.

This commit is contained in:
Adrien Allard committed 2019-03-12 08:25:18 +01:00
1 parent 9b7c17d06f
commit 0bef7fa9a5
2 files changed
+4 -5

No files matched your search

@@ -71,13 +71,13 @@ namespace FileConverter.Services
Diagnostics.Debug.Log($"Failed to check upgrade: {exception.Message}.");
}
if (task == null)
UpgradeVersionDescription versionDescription = await task;
if (versionDescription == null)
{
return null;
}
UpgradeVersionDescription versionDescription = await task;
Registry.SetValue(Registry.Keys.LastUpdateCheckDate, DateTime.Now.ToFileTime());
if (versionDescription.LatestVersion <= Application.ApplicationVersion)
+1 -2
View File
@@ -45,8 +45,7 @@ namespace FileConverter
throw;
}
IXmlSerializable xmlSerializableObject = deserializedObject as IXmlSerializable;
if (xmlSerializableObject != null)
if (deserializedObject is IXmlSerializable xmlSerializableObject)
{
xmlSerializableObject.OnDeserializationComplete();
}