diff options
author | George Hazan <ghazan@miranda.im> | 2018-04-23 17:17:43 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-04-23 17:17:43 +0300 |
commit | 4f688b57e4f370bf37117cccb0c2fba115c9a698 (patch) | |
tree | e9e1f9a8d3c64b5c1400cd3a75bf739df1543c7d /plugins/AVS/src | |
parent | e8af6bd8d639dc9146cd8777d2669fc22bb4e58a (diff) |
AVS not to free memory allocated outside
Diffstat (limited to 'plugins/AVS/src')
-rw-r--r-- | plugins/AVS/src/main.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/plugins/AVS/src/main.cpp b/plugins/AVS/src/main.cpp index 58edd6b794..23bcbd79c4 100644 --- a/plugins/AVS/src/main.cpp +++ b/plugins/AVS/src/main.cpp @@ -170,12 +170,15 @@ static int OnAccChanged(WPARAM wParam, LPARAM lParam) break;
case PRAC_REMOVED:
+ // little perversion not to call the object's destructor
+ protoPicCacheEntry *tmp = (protoPicCacheEntry *)_alloca(sizeof(protoPicCacheEntry));
+ tmp->cacheType = PCE_TYPE_ACCOUNT;
+ tmp->szProtoname = pa->szModuleName;
+
int idx;
- protoPicCacheEntry tmp(PCE_TYPE_ACCOUNT);
- tmp.szProtoname = pa->szModuleName;
- if ((idx = g_ProtoPictures.getIndex(&tmp)) != -1)
+ if ((idx = g_ProtoPictures.getIndex(tmp)) != -1)
g_ProtoPictures.remove(idx);
- if ((idx = g_MyAvatars.getIndex(&tmp)) != -1)
+ if ((idx = g_MyAvatars.getIndex(tmp)) != -1)
g_MyAvatars.remove(idx);
break;
}
|