From 072a0a7fedb64c1bc7631141995825888ce1ea25 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 19 Jun 2015 14:42:43 +0000 Subject: crash fix git-svn-id: http://svn.miranda-ng.org/main/trunk@14261 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- src/mir_app/src/proto_chains.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/mir_app') diff --git a/src/mir_app/src/proto_chains.cpp b/src/mir_app/src/proto_chains.cpp index e8b425e3e1..e8b7338e91 100644 --- a/src/mir_app/src/proto_chains.cpp +++ b/src/mir_app/src/proto_chains.cpp @@ -59,7 +59,7 @@ MIR_APP_DLL(INT_PTR) Proto_ChainSend(int iOrder, CCSDATA *ccs) { INT_PTR ret; - if (iOrder == (WPARAM)(-1)) + if (iOrder == -1) return 1; for (int i = iOrder; i < filters.getCount(); i++) { @@ -97,6 +97,12 @@ MIR_APP_DLL(INT_PTR) CallContactService(MCONTACT hContact, const char *szProtoSe ///////////////////////////////////////////////////////////////////////////////////////// +static void __stdcall stubChainRecv(void *param) +{ + CCSDATA *ccs = (CCSDATA*)param; + Proto_ChainRecv(0, ccs); +} + MIR_APP_DLL(INT_PTR) Proto_ChainRecv(int iOrder, CCSDATA *ccs) { INT_PTR ret; @@ -108,7 +114,7 @@ MIR_APP_DLL(INT_PTR) Proto_ChainRecv(int iOrder, CCSDATA *ccs) // begin processing by finding end of chain if (iOrder == 0) { if (GetCurrentThreadId() != hMainThreadId) // restart this function in the main thread - return Proto_ChainRecv(iOrder, ccs); + return CallFunctionAsync(stubChainRecv, ccs); iOrder = filters.getCount(); } -- cgit v1.2.3