mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-24 00:14:06 +00:00
Fix crash when UI Automation interface in absent in system
This commit is contained in:
parent
a815716810
commit
c5693dfa35
|
@ -28,7 +28,8 @@ 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;
|
||||||
hr = pGDAutomation->get_RawViewWalker( &pTree );
|
if( pGDAutomation != NULL )
|
||||||
|
hr = pGDAutomation->get_RawViewWalker( &pTree );
|
||||||
memset( buffer, 0, sizeof(buffer) );
|
memset( buffer, 0, sizeof(buffer) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue