atl: AddRef the object being returned in AtlInternalQueryInterface, not "this".

Robert Shearman rob at codeweavers.com
Tue Apr 3 12:14:22 CDT 2007


---
  dlls/atl/atl_main.c |    2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)

Fixes the crash reported in bug 4227.
-------------- next part --------------
diff --git a/dlls/atl/atl_main.c b/dlls/atl/atl_main.c
index b03effc..69d62e7 100644
--- a/dlls/atl/atl_main.c
+++ b/dlls/atl/atl_main.c
@@ -235,7 +235,7 @@ HRESULT WINAPI AtlInternalQueryInterface
             {
                 TRACE("Offset\n");
                 *ppvObject = ((LPSTR)this+pEntries[i].dw);
-                IUnknown_AddRef((IUnknown*)this);
+                IUnknown_AddRef((IUnknown*)*ppvObject);
                 rc = S_OK;
             }
             else


More information about the wine-patches mailing list