From 015dfdfbd64d6aaa7e28e9c12979501136137a1b Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 22 Dec 2024 21:03:51 +0300 Subject: =?UTF-8?q?fixes=20#4812=20(Clist=5Fmodern:=20=D0=B7=D0=B0=D0=BF?= =?UTF-8?q?=D1=80=D0=BE=D1=81=20=D0=B0=D0=B2=D1=82=D0=BE=D1=80=D0=B8=D0=B7?= =?UTF-8?q?=D0=B0=D1=86=D0=B8=D0=B8=20=D0=BD=D0=B5=20=D0=BF=D1=80=D0=BE?= =?UTF-8?q?=D0=BF=D0=B0=D0=B4=D0=B0=D0=B5=D1=82)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/mir_app/src/clistevents.cpp | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/mir_app/src/clistevents.cpp b/src/mir_app/src/clistevents.cpp index 3d38008d19..9feaa6181c 100644 --- a/src/mir_app/src/clistevents.cpp +++ b/src/mir_app/src/clistevents.cpp @@ -302,13 +302,11 @@ MIR_APP_DLL(CListEvent *) Clist_GetEvent(MCONTACT hContact, int idx) int EventsProcessContactDoubleClick(MCONTACT hContact) { if (auto *pEvent = Clist_GetEvent(hContact, 0)) { - if (CallService(pEvent->pszService, 0, (LPARAM)pEvent) == CALLSERVICE_NOTFOUND) - return 1; - - // if the event is still alive, free it - if (g_cliEvents.indexOf(pEvent)) - g_clistApi.pfnFreeEvent(pEvent); - return 0; + MEVENT hEvent = pEvent->hDbEvent; + if (CallService(pEvent->pszService, 0, (LPARAM)pEvent) != CALLSERVICE_NOTFOUND) { + Clist_RemoveEvent(hContact, hEvent); + return 0; + } } return 1; -- cgit v1.2.3