summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2015-06-19 14:42:43 +0000
committerGeorge Hazan <george.hazan@gmail.com>2015-06-19 14:42:43 +0000
commit072a0a7fedb64c1bc7631141995825888ce1ea25 (patch)
tree3adf4f21c0de03a0c04061dc717a0c9981eb1f2b
parent83310365c69bd40365ee0ae0e16c99c28e24cd0b (diff)
crash fix
git-svn-id: http://svn.miranda-ng.org/main/trunk@14261 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r--src/mir_app/src/proto_chains.cpp10
1 files changed, 8 insertions, 2 deletions
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();
}