summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--plugins/AVS/src/acc.cpp7
-rw-r--r--plugins/AVS/src/utils.cpp2
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));
}
///////////////////////////////////////////////////////////////////////////////////////////////////