Skip to content

Commit 378ed01

Browse files
authored
Fix: Fixed crash that would occur when using the 'Storage sense' action (#16606)
1 parent 2aab17e commit 378ed01

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/Files.App/Utils/Shell/LaunchHelper.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,12 @@ namespace Files.App.Utils.Shell
1616
/// </summary>
1717
public static class LaunchHelper
1818
{
19-
public static void LaunchSettings(string page)
19+
public unsafe static void LaunchSettings(string page)
2020
{
21-
var appActiveManager = new IApplicationActivationManager();
21+
using ComPtr<IApplicationActivationManager> pApplicationActivationManager = default;
22+
pApplicationActivationManager.CoCreateInstance<Shell32.ApplicationActivationManager>();
2223

23-
appActiveManager.ActivateApplication(
24+
pApplicationActivationManager.Get()->ActivateApplication(
2425
"windows.immersivecontrolpanel_cw5n1h2txyewy!microsoft.windows.immersivecontrolpanel",
2526
page,
2627
ACTIVATEOPTIONS.AO_NONE,

0 commit comments

Comments
 (0)