From b8110ca7ca2d793ebd94a1a8c73aa7c081d7bd0e Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 30 Nov 2012 11:30:50 +0000 Subject: various crash fixes git-svn-id: http://svn.miranda-ng.org/main/trunk@2564 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/AVS/src/acc.cpp | 5 ++++- plugins/MetaContacts/src/meta_services.cpp | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'plugins') diff --git a/plugins/AVS/src/acc.cpp b/plugins/AVS/src/acc.cpp index 00e0c644c8..598ccb6ab8 100644 --- a/plugins/AVS/src/acc.cpp +++ b/plugins/AVS/src/acc.cpp @@ -567,7 +567,10 @@ static LRESULT CALLBACK ACCWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM l DestroyAnimation(hwnd, data); data->hContact = (HANDLE) lParam; - lstrcpynA(data->proto, GetContactProto(data->hContact), sizeof(data->proto)); + if (lParam == NULL) + data->proto[0] = '\0'; + else + lstrcpynA(data->proto, GetContactProto(data->hContact), sizeof(data->proto)); StartAnimation(hwnd, data); diff --git a/plugins/MetaContacts/src/meta_services.cpp b/plugins/MetaContacts/src/meta_services.cpp index 6e8318b0af..449812a1e3 100644 --- a/plugins/MetaContacts/src/meta_services.cpp +++ b/plugins/MetaContacts/src/meta_services.cpp @@ -499,7 +499,7 @@ INT_PTR Meta_RecvMessage(WPARAM wParam, LPARAM lParam) HANDLE most_online = Meta_GetMostOnline(ccs->hContact); char *proto = GetContactProto(most_online); if (proto) - if ( CallProtoService(proto, PSR_MESSAGE, wParam, lParam) != CALLSERVICE_NOTFOUND) + if ( CallProtoService(proto, PSR_MESSAGE, 0, (LPARAM)pre) != CALLSERVICE_NOTFOUND) return 0; } -- cgit v1.2.3