Commit 0bebbbaa authored by Zhiyi Zhang's avatar Zhiyi Zhang Committed by Alexandre Julliard

msctf: Check TF_GetThreadMgr error in DocumentMgr_Destructor.

Thread manager could be already destroyed when calling DocumentMgr_Destructor. This removes the error dialog when closing Unreal Engine 4 games. Signed-off-by: 's avatarZhiyi Zhang <zzhang@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 5fb8e3ed
......@@ -77,11 +77,15 @@ static inline EnumTfContext *impl_from_IEnumTfContexts(IEnumTfContexts *iface)
static void DocumentMgr_Destructor(DocumentMgr *This)
{
ITfThreadMgr *tm;
ITfThreadMgr *tm = NULL;
TRACE("destroying %p\n", This);
TF_GetThreadMgr(&tm);
ThreadMgr_OnDocumentMgrDestruction(tm, &This->ITfDocumentMgr_iface);
if (tm)
{
ThreadMgr_OnDocumentMgrDestruction(tm, &This->ITfDocumentMgr_iface);
ITfThreadMgr_Release(tm);
}
if (This->contextStack[0])
ITfContext_Release(This->contextStack[0]);
......
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