atl: Fix AtlAxAttachControl wine check

Alexandre Goujon ale.goujon at gmail.com
Sun Aug 15 05:01:28 CDT 2010


---
 dlls/atl/atl_ax.c       |    3 +++
 dlls/atl/tests/atl_ax.c |    2 --
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/dlls/atl/atl_ax.c b/dlls/atl/atl_ax.c
index d9d60a5..1293cb8 100644
--- a/dlls/atl/atl_ax.c
+++ b/dlls/atl/atl_ax.c
@@ -1053,6 +1053,9 @@ HRESULT WINAPI AtlAxAttachControl(IUnknown* pControl, HWND hWnd, IUnknown** ppUn
         *ppUnkContainer = (IUnknown*) pUnkContainer;
     }
 
+    if(!hWnd)
+        return S_FALSE;
+
     return hr;
 }
 
diff --git a/dlls/atl/tests/atl_ax.c b/dlls/atl/tests/atl_ax.c
index d17046d..4555bd6 100644
--- a/dlls/atl/tests/atl_ax.c
+++ b/dlls/atl/tests/atl_ax.c
@@ -94,12 +94,10 @@ static void test_AtlAxAttachControl(void)
     }
 
     hr = pAtlAxAttachControl(pObj, NULL, NULL);
-    todo_wine
     ok(hr == S_FALSE, "Expected AtlAxAttachControl to return S_FALSE, got 0x%08x\n", hr);
 
     pContainer = (IUnknown *)0xdeadbeef;
     hr = pAtlAxAttachControl(pObj, NULL, &pContainer);
-    todo_wine
     ok(hr == S_FALSE, "Expected AtlAxAttachControl to return S_FALSE, got 0x%08x\n", hr);
     ok(pContainer != (IUnknown *)0xdeadbeef &&
        pContainer != NULL,
-- 
1.7.0.4




More information about the wine-patches mailing list