mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
Fix crash when canceling
This commit is contained in:
parent
682e7d8847
commit
bc5e4feabe
@ -258,6 +258,9 @@ void BeginInstall(CDownloadProgress* pProgress, const bool bPrerelease, const bo
|
||||
}
|
||||
DownloadAssetList(pProgress, manifest, blackList, DEFAULT_DEPOT_DOWNLOAD_DIR);
|
||||
|
||||
if (pProgress->IsCanceled())
|
||||
return;
|
||||
|
||||
// Download SDK files.
|
||||
if (!DownloadLatestGitHubReleaseManifest(XorStr("https://api.github.com/repos/Mauler125/r5sdk/releases"), responseMesage, manifest, bPrerelease))
|
||||
{
|
||||
@ -266,6 +269,9 @@ void BeginInstall(CDownloadProgress* pProgress, const bool bPrerelease, const bo
|
||||
}
|
||||
DownloadAssetList(pProgress, manifest, blackList, DEFAULT_DEPOT_DOWNLOAD_DIR);
|
||||
|
||||
if (pProgress->IsCanceled())
|
||||
return;
|
||||
|
||||
|
||||
// Install process cannot be canceled.
|
||||
pProgress->SetCanCancel(false);
|
||||
@ -303,7 +309,7 @@ void CBaseSurface::OnInstallClick(Forms::Control* Sender)
|
||||
|
||||
Threading::Thread([pProgress] {
|
||||
|
||||
BeginInstall(pProgress);
|
||||
BeginInstall(pProgress, false, false);
|
||||
|
||||
}).Start();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user