Skip to content

Commit d6bd168

Browse files
committed
A few more self references before resume_backgrounds
1 parent 3bca46c commit d6bd168

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

src/Microsoft.Management.Deployment/PackageCatalogReference.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -311,6 +311,7 @@ namespace winrt::Microsoft::Management::Deployment::implementation
311311
// Check for permissions and get caller info for telemetry
312312
THROW_IF_FAILED(EnsureComCallerHasCapability(Capability::PackageQuery));
313313

314+
auto strong_this = get_strong();
314315
auto report_progress{ co_await winrt::get_progress_token() };
315316
co_await winrt::resume_background();
316317

src/Microsoft.Management.Deployment/PackageManager.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1329,6 +1329,7 @@ namespace winrt::Microsoft::Management::Deployment::implementation
13291329

13301330
::AppInstaller::Repository::Source sourceToAdd = CreateSourceFromOptions(options);
13311331

1332+
auto strong_this = get_strong();
13321333
auto report_progress{ co_await winrt::get_progress_token() };
13331334
co_await winrt::resume_background();
13341335

@@ -1367,6 +1368,7 @@ namespace winrt::Microsoft::Management::Deployment::implementation
13671368
auto matchingSource = GetMatchingSource(winrt::to_string(options.Name()));
13681369
THROW_HR_IF(APPINSTALLER_CLI_ERROR_SOURCE_NAME_DOES_NOT_EXIST, !matchingSource.has_value());
13691370

1371+
auto strong_this = get_strong();
13701372
auto report_progress{ co_await winrt::get_progress_token() };
13711373
co_await winrt::resume_background();
13721374

0 commit comments

Comments
 (0)