Author: dchapyshev
Date: Sat Jul 18 20:47:40 2009
New Revision: 42058
URL:
http://svn.reactos.org/svn/reactos?rev=42058&view=rev
Log:
- Sync SHDefExtractIconW with Wine. Fixes crash at shelllink test
Modified:
trunk/reactos/dll/win32/shell32/iconcache.c
Modified: trunk/reactos/dll/win32/shell32/iconcache.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/iconcach…
==============================================================================
--- trunk/reactos/dll/win32/shell32/iconcache.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/iconcache.c [iso-8859-1] Sat Jul 18 20:47:40 2009
@@ -884,8 +884,14 @@
if (ret == 0xFFFFFFFF)
return E_FAIL;
if (ret > 0) {
- *phiconLarge = hIcons[0];
- *phiconSmall = hIcons[1];
+ if (phiconLarge)
+ *phiconLarge = hIcons[0];
+ else
+ DestroyIcon(hIcons[0]);
+ if (phiconSmall)
+ *phiconSmall = hIcons[1];
+ else
+ DestroyIcon(hIcons[1]);
return S_OK;
}
return S_FALSE;