msctf: Correct handling if NULL for pdimFocus in ITfThreadMgr::SetFocus.

This commit is contained in:
Aric Stewart 2009-08-31 14:48:40 -05:00 committed by Alexandre Julliard
parent 9eca2f81dc
commit ae51d05d78

View File

@ -389,7 +389,9 @@ static HRESULT WINAPI ThreadMgr_SetFocus( ITfThreadMgr* iface, ITfDocumentMgr *p
TRACE("(%p) %p\n",This,pdimFocus);
if (!pdimFocus || FAILED(IUnknown_QueryInterface(pdimFocus,&IID_ITfDocumentMgr,(LPVOID*) &check)))
if (!pdimFocus)
check = NULL;
else if (FAILED(IUnknown_QueryInterface(pdimFocus,&IID_ITfDocumentMgr,(LPVOID*) &check)))
return E_INVALIDARG;
ITfThreadMgrEventSink_OnSetFocus((ITfThreadMgrEventSink*)&This->ThreadMgrEventSinkVtbl, check, This->focus);