Skip to content

Commit 45d8464

Browse files
fix(shell): check if spShellWindows failed to create to prevent crash
1 parent 053112e commit 45d8464

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/shell/script/binding_types_com.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ std::vector<std::tuple<HWND, CComPtr<IShellBrowser>>> GetIShellBrowsers() {
8282
CComPtr<IShellWindows> spShellWindows;
8383
spShellWindows.CoCreateInstance(CLSID_ShellWindows);
8484

85+
if (!spShellWindows) return {};
8586
CComVariant vtLoc(CSIDL_DESKTOP);
8687
CComVariant vtEmpty;
8788

0 commit comments

Comments
 (0)