Commit 846093ea authored by Aric Stewart's avatar Aric Stewart Committed by Alexandre Julliard

msctf: ITfDocumentMgr::GetBase returns the top if there is only one context pushed.

parent af860c1a
......@@ -199,14 +199,21 @@ static HRESULT WINAPI DocumentMgr_GetTop(ITfDocumentMgr *iface, ITfContext **ppi
static HRESULT WINAPI DocumentMgr_GetBase(ITfDocumentMgr *iface, ITfContext **ppic)
{
DocumentMgr *This = (DocumentMgr *)iface;
ITfContext *tgt;
TRACE("(%p)\n",This);
if (!ppic)
return E_INVALIDARG;
if (This->contextStack[1])
ITfContext_AddRef(This->contextStack[1]);
tgt = This->contextStack[1];
else
tgt = This->contextStack[0];
if (tgt)
ITfContext_AddRef(tgt);
*ppic = This->contextStack[1];
*ppic = tgt;
return S_OK;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment