From 8afe326e69706f6bbcd501d4ea93656370a68162 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 2 Mar 2016 16:26:22 +0000 Subject: minor fix for unloading ani avatars git-svn-id: http://svn.miranda-ng.org/main/trunk@16394 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/SmileyAdd/src/AniSmileyObject.cpp | 4 +++- plugins/SmileyAdd/src/imagecache.cpp | 1 - 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'plugins/SmileyAdd') diff --git a/plugins/SmileyAdd/src/AniSmileyObject.cpp b/plugins/SmileyAdd/src/AniSmileyObject.cpp index 90a04df8fa..c437b9ab5a 100644 --- a/plugins/SmileyAdd/src/AniSmileyObject.cpp +++ b/plugins/SmileyAdd/src/AniSmileyObject.cpp @@ -71,8 +71,10 @@ public: void UnloadSmiley() { - if (m_bRegistered) + if (m_bRegistered) { m_sml->RemoveObject(this); + m_bRegistered = false; + } if (m_img != NULL) { m_img->Release(); diff --git a/plugins/SmileyAdd/src/imagecache.cpp b/plugins/SmileyAdd/src/imagecache.cpp index fa6220934b..36fd89e09d 100644 --- a/plugins/SmileyAdd/src/imagecache.cpp +++ b/plugins/SmileyAdd/src/imagecache.cpp @@ -347,7 +347,6 @@ ImageType::ImageType(const unsigned id, const CMString& file, const int index, c if (m_bmp->GetLastStatus() != Gdiplus::Ok) { delete m_bmp; m_bmp = NULL; - return; } } -- cgit v1.2.3