Jacek Caban : atl80: Skip NULL map entries in AtlComModuleRegisterServer.

Alexandre Julliard julliard at winehq.org
Thu Jan 10 13:36:12 CST 2013


Module: wine
Branch: master
Commit: 07065b4d939f2f5d469f99e68332208462d5d1df
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=07065b4d939f2f5d469f99e68332208462d5d1df

Author: Jacek Caban <jacek at codeweavers.com>
Date:   Thu Jan 10 13:26:46 2013 +0100

atl80: Skip NULL map entries in AtlComModuleRegisterServer.

---

 dlls/atl80/atl80.c |   21 +++++++++++----------
 1 files changed, 11 insertions(+), 10 deletions(-)

diff --git a/dlls/atl80/atl80.c b/dlls/atl80/atl80.c
index 278d736..2cee94c 100644
--- a/dlls/atl80/atl80.c
+++ b/dlls/atl80/atl80.c
@@ -37,18 +37,19 @@ HRESULT WINAPI AtlComModuleRegisterServer(_ATL_COM_MODULE *mod, BOOL bRegTypeLib
     TRACE("(%p %x %s)\n", mod, bRegTypeLib, debugstr_guid(clsid));
 
     for(iter = mod->m_ppAutoObjMapFirst; iter < mod->m_ppAutoObjMapLast; iter++) {
-        if(!clsid || IsEqualCLSID((*iter)->pclsid, clsid)) {
-            TRACE("Registering clsid %s\n", debugstr_guid((*iter)->pclsid));
-            hres = (*iter)->pfnUpdateRegistry(TRUE);
+        if(!*iter || (clsid && !IsEqualCLSID((*iter)->pclsid, clsid)))
+            continue;
+
+        TRACE("Registering clsid %s\n", debugstr_guid((*iter)->pclsid));
+        hres = (*iter)->pfnUpdateRegistry(TRUE);
+        if(FAILED(hres))
+            return hres;
+
+        catmap = (*iter)->pfnGetCategoryMap();
+        if(catmap) {
+            hres = AtlRegisterClassCategoriesHelper((*iter)->pclsid, catmap, TRUE);
             if(FAILED(hres))
                 return hres;
-
-            catmap = (*iter)->pfnGetCategoryMap();
-            if(catmap) {
-                hres = AtlRegisterClassCategoriesHelper((*iter)->pclsid, catmap, TRUE);
-                if(FAILED(hres))
-                    return hres;
-            }
         }
     }
 




More information about the wine-cvs mailing list