From f71f3270c1b57b838e8761fe1dcb86d9e43e48d2 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 5 Jun 2016 16:17:03 +0000 Subject: fix for nasty optimization problem in icolib git-svn-id: http://svn.miranda-ng.org/main/trunk@16919 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- src/mir_app/src/icolib.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/mir_app/src/icolib.cpp b/src/mir_app/src/icolib.cpp index e77cc58a59..d25898780f 100644 --- a/src/mir_app/src/icolib.cpp +++ b/src/mir_app/src/icolib.cpp @@ -552,7 +552,11 @@ MIR_APP_DLL(int) IcoLib_ReleaseIcon(HICON hIcon, bool big) return 1; mir_cslock lck(csIconList); - return ReleaseIconInternal(IcoLib_FindHIcon(hIcon, big), big); + + // this call might change the 'big' parameter + // if inserted into the call of ReleaseIconInternal(), the unchanged 'big' will be passed first + IcolibItem *pItem = IcoLib_FindHIcon(hIcon, big); + return ReleaseIconInternal(pItem, big); } MIR_APP_DLL(int) IcoLib_Release(const char *szIconName, bool big) -- cgit v1.2.3