Skip to content

Commit

Permalink
Don't crash when the checking for updates without a network (#16002)
Browse files Browse the repository at this point in the history
You can't catch an A/V. 

Closes #15459
  • Loading branch information
zadjii-msft authored Sep 20, 2023
1 parent 394b942 commit 523edd7
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/cascadia/TerminalApp/AboutDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,13 @@ namespace winrt::TerminalApp::implementation
{
const auto updates = co_await storeContext.GetAppAndOptionalStorePackageUpdatesAsync();
co_await wil::resume_foreground(strongThis->Dispatcher());
const auto numUpdates = updates.Size();
if (numUpdates > 0)
if (updates)
{
UpdatesAvailable(true);
const auto numUpdates = updates.Size();
if (numUpdates > 0)
{
UpdatesAvailable(true);
}
}
}
#endif
Expand Down

0 comments on commit 523edd7

Please sign in to comment.