[PATCH 4/6] ole32: Remove initialized state test in CoCreateInstanceEx().

Nikolay Sivov nsivov at codeweavers.com
Wed Aug 12 23:56:29 CDT 2020


We only have same machine case working, CoGetClassObject() checks already cover that.

Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
---
 dlls/ole32/compobj.c | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/dlls/ole32/compobj.c b/dlls/ole32/compobj.c
index f84c12243f7..cf1feeb3f41 100644
--- a/dlls/ole32/compobj.c
+++ b/dlls/ole32/compobj.c
@@ -2969,7 +2969,6 @@ HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstanceEx(
 {
     IUnknown *unk = NULL;
     IClassFactory *cf;
-    APARTMENT *apt;
     CLSID clsid;
     HRESULT hres;
 
@@ -2987,13 +2986,6 @@ HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstanceEx(
     if(FAILED(hres))
         clsid = *rclsid;
 
-    if (!(apt = apartment_get_current_or_mta()))
-    {
-        ERR("apartment not initialised\n");
-        return CO_E_NOTINITIALIZED;
-    }
-    apartment_release(apt);
-
     /*
      * Get a class factory to construct the object we want.
      */
-- 
2.28.0




More information about the wine-devel mailing list