Skip to content

Fix: Fixed crash when creating taskbar progress #14190

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Dec 10, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions src/Files.App/Utils/Shell/Win32API.cs
Original file line number Diff line number Diff line change
Expand Up @@ -568,18 +568,17 @@ public static Task<bool> MountVhdDisk(string vhdPath)

public static Shell32.ITaskbarList4? CreateTaskbarObject()
{
var taskbar2 = new Shell32.ITaskbarList2();
try
{
var taskbar2 = new Shell32.ITaskbarList2();
taskbar2.HrInit();
return taskbar2 as Shell32.ITaskbarList4;
}
catch (NotImplementedException)
catch (Exception)
{
// explorer.exe is not running as a shell
return null;
}

return taskbar2 as Shell32.ITaskbarList4;
}

private static Bitmap GetAlphaBitmapFromBitmapData(BitmapData bmpData)
Expand Down