mirror of
https://github.com/momo5502/emulator.git
synced 2026-01-19 03:33:56 +00:00
Only register hive when successful
This commit is contained in:
@@ -29,7 +29,11 @@ namespace
|
||||
void register_hive(registry_manager::hive_map& hives,
|
||||
const std::filesystem::path& key, const std::filesystem::path& file)
|
||||
{
|
||||
hives[canonicalize_path(key)] = std::make_unique<hive_parser>(file);
|
||||
auto hive = std::make_unique<hive_parser>(file);
|
||||
if (hive && hive->success())
|
||||
{
|
||||
hives[canonicalize_path(key)] = std::move(hive);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user