Commit 9704fcaf authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

atl100: Fixed NULL catmap handling in AtlRegisterClassCategoriesHelper.

parent 8cd903aa
...@@ -429,6 +429,9 @@ HRESULT WINAPI AtlRegisterClassCategoriesHelper(REFCLSID clsid, const struct _AT ...@@ -429,6 +429,9 @@ HRESULT WINAPI AtlRegisterClassCategoriesHelper(REFCLSID clsid, const struct _AT
TRACE("(%s %p %x)\n", debugstr_guid(clsid), catmap, reg); TRACE("(%s %p %x)\n", debugstr_guid(clsid), catmap, reg);
if(!catmap)
return S_OK;
if(!catreg) { if(!catreg) {
ICatRegister *new_catreg; ICatRegister *new_catreg;
......
...@@ -154,6 +154,13 @@ static void test_regcat(void) ...@@ -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 "}\\Implemented Categories");
test_key_not_exists(HKEY_CLASSES_ROOT, "CLSID\\{" CLSID_TEST_STR "}\\Required Categories"); test_key_not_exists(HKEY_CLASSES_ROOT, "CLSID\\{" CLSID_TEST_STR "}\\Required Categories");
test_key_exists(HKEY_CLASSES_ROOT, "CLSID\\{" CLSID_TEST_STR "}"); 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) static void test_typelib(void)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment