File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -494,10 +494,14 @@ bool BrowserFactory::AttachToBrowserUsingShellWindows(
494
494
LOG (TRACE) << " Entering BrowserFactory::AttachToBrowserUsingShellWindows" ;
495
495
496
496
CComPtr<IShellWindows> shell_windows;
497
- shell_windows.CoCreateInstance (CLSID_ShellWindows);
497
+ HRESULT hr = shell_windows.CoCreateInstance (CLSID_ShellWindows);
498
+ if (FAILED (hr)) {
499
+ LOGHR (WARN, hr) << " Unable to create an object using the IShellWindows interface with CoCreateInstance" ;
500
+ return false ;
501
+ }
498
502
499
503
CComPtr<IUnknown> enumerator_unknown;
500
- HRESULT hr = shell_windows->_NewEnum (&enumerator_unknown);
504
+ hr = shell_windows->_NewEnum (&enumerator_unknown);
501
505
if (FAILED (hr)) {
502
506
LOGHR (WARN, hr) << " Unable to get enumerator from IShellWindows interface" ;
503
507
return false ;
You can’t perform that action at this time.
0 commit comments