From d7d7e3bc33ea164e5aed7b3819740d69fd495afe Mon Sep 17 00:00:00 2001 From: Rolf Kalbermatter Date: Sun, 15 Dec 2002 01:13:45 +0000 Subject: [PATCH] Fix crash when constructing ANSI interface pointer to IExtractIcon, found by Uwe Bonnes. Add some traces to the constructors. --- dlls/shell32/folders.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/dlls/shell32/folders.c b/dlls/shell32/folders.c index db280f3b36f..ff8ea2a1b33 100644 --- a/dlls/shell32/folders.c +++ b/dlls/shell32/folders.c @@ -62,6 +62,8 @@ static struct ICOM_VTABLE(IPersistFile) pfvt; IExtractIconW* IExtractIconW_Constructor(LPCITEMIDLIST pidl) { IExtractIconWImpl* ei; + + TRACE("%p\n", pidl); ei = (IExtractIconWImpl*)HeapAlloc(GetProcessHeap(),0,sizeof(IExtractIconWImpl)); ei->ref=1; @@ -285,8 +287,10 @@ static struct ICOM_VTABLE(IExtractIconW) eivt = IExtractIconA* IExtractIconA_Constructor(LPCITEMIDLIST pidl) { ICOM_THIS(IExtractIconWImpl, IExtractIconW_Constructor(pidl)); - - return (IExtractIconA *)This->lpvtblExtractIconA; + IExtractIconA *eia = (IExtractIconA *)&This->lpvtblExtractIconA; + + TRACE("(%p)->(%p)\n", This, eia); + return eia; } /************************************************************************** * IExtractIconA_QueryInterface