Skip to content

Commit

Permalink
Fix: Fixed crash that would occur when updating from the store (#10795)
Browse files Browse the repository at this point in the history
  • Loading branch information
puppetsw authored Dec 21, 2022
1 parent 5fd6d6e commit ac1160f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Files.App/ServicesImplementation/UpdateService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
using System.Linq;
using System.Threading.Tasks;
using Windows.Services.Store;
using WinRT.Interop;

namespace Files.App.ServicesImplementation
{
Expand Down Expand Up @@ -106,6 +107,9 @@ private async Task GetUpdatePackages()
try
{
_storeContext ??= await Task.Run(StoreContext.GetDefault);

InitializeWithWindow.Initialize(_storeContext, App.WindowHandle);

var updateList = await _storeContext.GetAppAndOptionalStorePackageUpdatesAsync();
_updatePackages = updateList?.ToList();
}
Expand Down

0 comments on commit ac1160f

Please sign in to comment.