Nikolay Sivov : ole32: Remove initialized state test in CoCreateInstanceEx().

Alexandre Julliard julliard at winehq.org
Thu Aug 13 15:11:50 CDT 2020


Module: wine
Branch: master
Commit: 32de02209308f642f89670852eba235a0c0ac722
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=32de02209308f642f89670852eba235a0c0ac722

Author: Nikolay Sivov <nsivov at codeweavers.com>
Date:   Thu Aug 13 08:29:32 2020 +0100

ole32: Remove initialized state test in CoCreateInstanceEx().

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

Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
Signed-off-by: Huw Davies <huw at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/ole32/compobj.c | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/dlls/ole32/compobj.c b/dlls/ole32/compobj.c
index f84c12243f..cf1feeb3f4 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.
      */




More information about the wine-cvs mailing list