From 07065b4d939f2f5d469f99e68332208462d5d1df Mon Sep 17 00:00:00 2001 From: Jacek Caban Date: Thu, 10 Jan 2013 13:26:46 +0100 Subject: [PATCH] atl80: Skip NULL map entries in AtlComModuleRegisterServer. --- dlls/atl80/atl80.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/dlls/atl80/atl80.c b/dlls/atl80/atl80.c index 278d736d622..2cee94c5da0 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; - } } }