From f07feab44bd3ef047229f511fadb3a151f200654 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 3 Apr 2013 17:32:33 +0000 Subject: crash fix for SmileyAdd git-svn-id: http://svn.miranda-ng.org/main/trunk@4295 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/SmileyAdd/src/SmileyBase.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'plugins/SmileyAdd/src') diff --git a/plugins/SmileyAdd/src/SmileyBase.cpp b/plugins/SmileyAdd/src/SmileyBase.cpp index 9603e6da17..f0107e758c 100644 --- a/plugins/SmileyAdd/src/SmileyBase.cpp +++ b/plugins/SmileyAdd/src/SmileyBase.cpp @@ -366,8 +366,7 @@ HRESULT ISmileyBase::GetTooltip(BSTR *bstrHint) void CloseSmileys(void) { - for (int i=regSmileys.getCount(); i--;) - { + for (int i=regSmileys.getCount()-1; i >= 0; i--) { regSmileys[i]->OnClose(); regSmileys[i]->Close(OLECLOSE_NOSAVE); } @@ -375,8 +374,9 @@ void CloseSmileys(void) int CheckForTip(int x, int y, HWND hwnd, TCHAR** smltxt) { - for (int i=0; iQueryHitPointSpecial(x, y, hwnd, smltxt)) return i; + for (int i=0; i < regSmileys.getCount(); ++i) + if (regSmileys[i]->QueryHitPointSpecial(x, y, hwnd, smltxt)) + return i; return -1; } -- cgit v1.2.3