Fixed reg_unload: ignore empty root_key
@@ -457,7 +457,8 @@ static void reg_unload(Reg* reg)
RegKey* pKey;
WINPR_ASSERT(reg);
- WINPR_ASSERT(reg->root_key);
+ if (reg->root_key)
+ {
pKey = reg->root_key->subkeys;
while (pKey != NULL)
@@ -469,6 +470,7 @@ static void reg_unload(Reg* reg)
free(reg->root_key);
}
+}
Reg* reg_open(BOOL read_only)
{
