Fix crash when UI Automation interface in absent in system

This commit is contained in:
Abs62 2011-07-30 17:09:09 +04:00
parent a815716810
commit c5693dfa35

View file

@ -28,7 +28,8 @@ HRESULT hr;
hr = CoCreateInstance( CLSID_CUIAutomation , NULL, CLSCTX_INPROC_SERVER, IID_IUIAutomation, (void**)&pGDAutomation );
if( hr != S_OK ) pGDAutomation = NULL;
pTree = NULL;
hr = pGDAutomation->get_RawViewWalker( &pTree );
if( pGDAutomation != NULL )
hr = pGDAutomation->get_RawViewWalker( &pTree );
memset( buffer, 0, sizeof(buffer) );
}