diff options
author | George Hazan <george.hazan@gmail.com> | 2024-01-17 22:55:45 +0300 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2024-01-17 22:55:45 +0300 |
commit | a6173f891d255c44118f135992a6d5585ad22490 (patch) | |
tree | 0f83e07f40aa94428b825237f5c72fecd261763a /src | |
parent | 0408c8952ca633a1ef37e3c4419816fa4ad5c418 (diff) |
fixes #4127 (StdUserInfo: падение при открытии информации о метаконтакте)
Diffstat (limited to 'src')
-rw-r--r-- | src/mir_app/src/protocols.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
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);
|