mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-24 04:24:09 +00:00
Fix crash when UI Automation interface in absent in system
This commit is contained in:
parent
a815716810
commit
c5693dfa35
|
@ -28,6 +28,7 @@ HRESULT hr;
|
||||||
hr = CoCreateInstance( CLSID_CUIAutomation , NULL, CLSCTX_INPROC_SERVER, IID_IUIAutomation, (void**)&pGDAutomation );
|
hr = CoCreateInstance( CLSID_CUIAutomation , NULL, CLSCTX_INPROC_SERVER, IID_IUIAutomation, (void**)&pGDAutomation );
|
||||||
if( hr != S_OK ) pGDAutomation = NULL;
|
if( hr != S_OK ) pGDAutomation = NULL;
|
||||||
pTree = NULL;
|
pTree = NULL;
|
||||||
|
if( pGDAutomation != NULL )
|
||||||
hr = pGDAutomation->get_RawViewWalker( &pTree );
|
hr = pGDAutomation->get_RawViewWalker( &pTree );
|
||||||
memset( buffer, 0, sizeof(buffer) );
|
memset( buffer, 0, sizeof(buffer) );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue