Skip to content

Commit 80d0a27

Browse files
committed
Code quality
1 parent 3300c94 commit 80d0a27

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

Flow.Launcher.Infrastructure/QuickSwitch/QuickSwitch.cs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,14 @@ private static unsafe void EnumerateShellWindows(Action<object> action)
215215
var clsidShellWindows = new Guid("9BA05972-F6A8-11CF-A442-00A0C90A8F39"); // ShellWindowsClass
216216
var iidIShellWindows = typeof(IShellWindows).GUID; // IShellWindows
217217

218-
PInvoke.CoCreateInstance(&clsidShellWindows, null, CLSCTX.CLSCTX_ALL, &iidIShellWindows, out var shellWindowsObj);
218+
var result = PInvoke.CoCreateInstance(
219+
&clsidShellWindows,
220+
null,
221+
CLSCTX.CLSCTX_ALL,
222+
&iidIShellWindows,
223+
out var shellWindowsObj);
224+
225+
if (result.Failed) return;
219226

220227
var shellWindows = (IShellWindows)shellWindowsObj;
221228

0 commit comments

Comments
 (0)