atl100: Fixed NULL catmap handling in AtlRegisterClassCategoriesHelper.

This commit is contained in:
Jacek Caban 2012-12-31 14:29:23 +01:00 committed by Alexandre Julliard
parent 8cd903aa10
commit 9704fcaf73
2 changed files with 10 additions and 0 deletions

View File

@ -429,6 +429,9 @@ HRESULT WINAPI AtlRegisterClassCategoriesHelper(REFCLSID clsid, const struct _AT
TRACE("(%s %p %x)\n", debugstr_guid(clsid), catmap, reg);
if(!catmap)
return S_OK;
if(!catreg) {
ICatRegister *new_catreg;

View File

@ -154,6 +154,13 @@ static void test_regcat(void)
test_key_not_exists(HKEY_CLASSES_ROOT, "CLSID\\{" CLSID_TEST_STR "}\\Implemented Categories");
test_key_not_exists(HKEY_CLASSES_ROOT, "CLSID\\{" CLSID_TEST_STR "}\\Required Categories");
test_key_exists(HKEY_CLASSES_ROOT, "CLSID\\{" CLSID_TEST_STR "}");
ok(RegDeleteKeyA(HKEY_CLASSES_ROOT, "CLSID\\{" CLSID_TEST_STR "}") == ERROR_SUCCESS, "Could not delete key\n");
hres = AtlRegisterClassCategoriesHelper(&CLSID_Test, NULL, TRUE);
ok(hres == S_OK, "AtlRegisterClassCategoriesHelper failed: %08x\n", hres);
test_key_not_exists(HKEY_CLASSES_ROOT, "CLSID\\{" CLSID_TEST_STR "}");
}
static void test_typelib(void)