From a6173f891d255c44118f135992a6d5585ad22490 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 17 Jan 2024 22:55:45 +0300 Subject: =?UTF-8?q?fixes=20#4127=20(StdUserInfo:=20=D0=BF=D0=B0=D0=B4?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=D0=B5=20=D0=BF=D1=80=D0=B8=20=D0=BE=D1=82?= =?UTF-8?q?=D0=BA=D1=80=D1=8B=D1=82=D0=B8=D0=B8=20=D0=B8=D0=BD=D1=84=D0=BE?= =?UTF-8?q?=D1=80=D0=BC=D0=B0=D1=86=D0=B8=D0=B8=20=D0=BE=20=D0=BC=D0=B5?= =?UTF-8?q?=D1=82=D0=B0=D0=BA=D0=BE=D0=BD=D1=82=D0=B0=D0=BA=D1=82=D0=B5)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/mir_app/src/protocols.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/mir_app/src/protocols.cpp b/src/mir_app/src/protocols.cpp index cf754b9ff0..0c0f834562 100644 --- a/src/mir_app/src/protocols.cpp +++ b/src/mir_app/src/protocols.cpp @@ -382,10 +382,11 @@ MIR_APP_DLL(int) ProtoServiceExists(const char *szModule, const char *szService) INT_PTR CallContactServiceInt(MCONTACT hContact, const char *szModule, const char *szService, WPARAM wParam, LPARAM lParam) { - auto *ppi = Proto_GetInstance(szModule); - if (ppi != nullptr) { - TServiceListItem *item = (TServiceListItem *)bsearch(&szService, serviceItems, _countof(serviceItems), sizeof(serviceItems[0]), CompareServiceItems); - if (item) { + TServiceListItem *item = (TServiceListItem *)bsearch(&szService, serviceItems, _countof(serviceItems), sizeof(serviceItems[0]), CompareServiceItems); + if (item) { + auto *pa = Proto_GetAccount(szModule); + auto *ppi = (pa) ? pa->ppro : 0; + if (ppi != nullptr) { switch (item->id) { case 1: return (INT_PTR)ppi->AddToList(wParam, (PROTOSEARCHRESULT *)lParam); case 2: return (INT_PTR)ppi->AddToListByEvent(LOWORD(wParam), HIWORD(wParam), (MEVENT)lParam); -- cgit v1.2.3