diff --git a/src/Files.App/Utils/Shell/Win32API.cs b/src/Files.App/Utils/Shell/Win32API.cs index 27b883658365..975888bc2be6 100644 --- a/src/Files.App/Utils/Shell/Win32API.cs +++ b/src/Files.App/Utils/Shell/Win32API.cs @@ -568,18 +568,17 @@ public static Task 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)