diff options
author | George Hazan <ghazan@miranda.im> | 2019-01-23 19:50:02 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2019-01-23 19:50:02 +0300 |
commit | 8ebf21e565886d2629ba2ad5b74466879c529c3e (patch) | |
tree | 1dac70aa4e69455706f3a9eba9d4ab678c53b674 /protocols/ICQ-WIM/src/server.cpp | |
parent | 0489bed8751d89c37ee7a3eb08cc8aa80b3524a0 (diff) |
fixes #1760 (ICQ10: random crash)
Diffstat (limited to 'protocols/ICQ-WIM/src/server.cpp')
-rw-r--r-- | protocols/ICQ-WIM/src/server.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/protocols/ICQ-WIM/src/server.cpp b/protocols/ICQ-WIM/src/server.cpp index dfe5639cc8..9491c855e2 100644 --- a/protocols/ICQ-WIM/src/server.cpp +++ b/protocols/ICQ-WIM/src/server.cpp @@ -68,6 +68,7 @@ MCONTACT CIcqProto::CheckOwnMessage(const CMStringA &reqId, const CMStringA &msg if (db_event_getById(m_szModuleName, msgId) == 0) db_event_setId(m_szModuleName, 1, msgId); + mir_cslock lck(m_csOwnIds); m_arOwnIds.remove(m_arOwnIds.indexOf(&own)); } return ret; @@ -627,6 +628,8 @@ void CIcqProto::OnSendMessage(NETLIBHTTPREQUEST *pReply, AsyncHttpRequest *pReq) JsonReply root(pReply); if (root.error() != 200) { ProtoBroadcastAck(ownMsg->m_hContact, ACKTYPE_MESSAGE, ACKRESULT_FAILED, (HANDLE)ownMsg->m_msgid, 0); + + mir_cslock lck(m_csOwnIds); for (auto &it : m_arOwnIds) { if (it == ownMsg) { m_arOwnIds.remove(m_arOwnIds.indexOf(&it)); |