diff --git a/src/windows-emulator/registry_manager.cpp b/src/windows-emulator/registry_manager.cpp index 0008452c..c73f5f94 100644 --- a/src/windows-emulator/registry_manager.cpp +++ b/src/windows-emulator/registry_manager.cpp @@ -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(file); + auto hive = std::make_unique(file); + if (hive && hive->success()) + { + hives[canonicalize_path(key)] = std::move(hive); + } } }