fix exception disposal
This commit is contained in:
parent
53a9291dbf
commit
2c9cc36334
1 changed files with 10 additions and 2 deletions
|
@ -68,8 +68,6 @@ internal partial class MainForm : CustomForm
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
checkForUpdatesResult = await updateManager.CheckForUpdatesAsync(cancellationTokenSource.Token);
|
checkForUpdatesResult = await updateManager.CheckForUpdatesAsync(cancellationTokenSource.Token);
|
||||||
cancellationTokenSource.Dispose();
|
|
||||||
cancellationTokenSource = null;
|
|
||||||
#if !DEBUG
|
#if !DEBUG
|
||||||
if (checkForUpdatesResult.CanUpdate)
|
if (checkForUpdatesResult.CanUpdate)
|
||||||
{
|
{
|
||||||
|
@ -88,6 +86,11 @@ internal partial class MainForm : CustomForm
|
||||||
#else
|
#else
|
||||||
catch { }
|
catch { }
|
||||||
#endif
|
#endif
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
cancellationTokenSource.Dispose();
|
||||||
|
cancellationTokenSource = null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (latestVersion is null)
|
if (latestVersion is null)
|
||||||
{
|
{
|
||||||
|
@ -203,6 +206,11 @@ internal partial class MainForm : CustomForm
|
||||||
#else
|
#else
|
||||||
catch { }
|
catch { }
|
||||||
#endif
|
#endif
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
cancellationTokenSource.Dispose();
|
||||||
|
cancellationTokenSource = null;
|
||||||
|
}
|
||||||
|
|
||||||
if (updateManager is not null && updateManager.IsUpdatePrepared(latestVersion))
|
if (updateManager is not null && updateManager.IsUpdatePrepared(latestVersion))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue