msctf: TfContext intitalization and uninitialization on Push and Pop.
diff --git a/dlls/msctf/documentmgr.c b/dlls/msctf/documentmgr.c
index e1e5b19..7fd354a 100644
--- a/dlls/msctf/documentmgr.c
+++ b/dlls/msctf/documentmgr.c
@@ -138,6 +138,7 @@
This->contextStack[0] = check;
ITfThreadMgrEventSink_OnPushContext(This->ThreadMgrSink,check);
+ Context_Initialize(check);
return S_OK;
}
@@ -153,11 +154,13 @@
{
ITfThreadMgrEventSink_OnPopContext(This->ThreadMgrSink,This->contextStack[0]);
ITfContext_Release(This->contextStack[0]);
+ Context_Uninitialize(This->contextStack[0]);
}
if (This->contextStack[1])
{
ITfThreadMgrEventSink_OnPopContext(This->ThreadMgrSink,This->contextStack[1]);
ITfContext_Release(This->contextStack[1]);
+ Context_Uninitialize(This->contextStack[1]);
}
This->contextStack[0] = This->contextStack[1] = NULL;
ITfThreadMgrEventSink_OnUninitDocumentMgr(This->ThreadMgrSink, iface);
@@ -172,6 +175,7 @@
ITfThreadMgrEventSink_OnPopContext(This->ThreadMgrSink,This->contextStack[0]);
ITfContext_Release(This->contextStack[0]);
+ Context_Uninitialize(This->contextStack[0]);
This->contextStack[0] = This->contextStack[1];
This->contextStack[1] = NULL;