From 7e2bed99b8564bb1393b0b133c2a3ae415682fde Mon Sep 17 00:00:00 2001 From: Tobias Weimer Date: Fri, 1 May 2015 16:53:52 +0000 Subject: AVS: -minor fixes git-svn-id: http://svn.miranda-ng.org/main/trunk@13335 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/AVS/src/acc.cpp | 7 ++----- plugins/AVS/src/utils.cpp | 2 +- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/plugins/AVS/src/acc.cpp b/plugins/AVS/src/acc.cpp index 75ba7bdbf9..256f92936d 100644 --- a/plugins/AVS/src/acc.cpp +++ b/plugins/AVS/src/acc.cpp @@ -399,8 +399,8 @@ static LRESULT CALLBACK ACCWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lP return TRUE; case WM_NCDESTROY: - DestroyAnimation(data); if (data) { + DestroyAnimation(data); UnhookEvent(data->hHook); UnhookEvent(data->hHookMy); mir_free(data); @@ -421,10 +421,7 @@ static LRESULT CALLBACK ACCWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lP DestroyAnimation(data); data->hContact = lParam; - if (lParam == NULL) - data->proto[0] = '\0'; - else - mir_strncpy(data->proto, GetContactProto(data->hContact), sizeof(data->proto)); + mir_strncpy(data->proto, GetContactProto(data->hContact), sizeof(data->proto)); StartAnimation(data); diff --git a/plugins/AVS/src/utils.cpp b/plugins/AVS/src/utils.cpp index 70d0349948..106615ec77 100644 --- a/plugins/AVS/src/utils.cpp +++ b/plugins/AVS/src/utils.cpp @@ -280,7 +280,7 @@ void protoPicCacheEntry::clear() if (hbmPic != 0) DeleteObject(hbmPic); - memset(this, 0, sizeof(avatarCacheEntry)); + memset(this, 0, sizeof(protoPicCacheEntry)); } /////////////////////////////////////////////////////////////////////////////////////////////////// -- cgit v1.2.3