Skip to content

Commit ac1160f

Browse files
authored
Fix: Fixed crash that would occur when updating from the store (#10795)
1 parent 5fd6d6e commit ac1160f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Files.App/ServicesImplementation/UpdateService.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
using System.Linq;
99
using System.Threading.Tasks;
1010
using Windows.Services.Store;
11+
using WinRT.Interop;
1112

1213
namespace Files.App.ServicesImplementation
1314
{
@@ -106,6 +107,9 @@ private async Task GetUpdatePackages()
106107
try
107108
{
108109
_storeContext ??= await Task.Run(StoreContext.GetDefault);
110+
111+
InitializeWithWindow.Initialize(_storeContext, App.WindowHandle);
112+
109113
var updateList = await _storeContext.GetAppAndOptionalStorePackageUpdatesAsync();
110114
_updatePackages = updateList?.ToList();
111115
}

0 commit comments

Comments
 (0)