diff --git a/Code/Framework/Tests/AssetCatalog.cpp b/Code/Framework/Tests/AssetCatalog.cpp index 42df712713..1575b0a469 100644 --- a/Code/Framework/Tests/AssetCatalog.cpp +++ b/Code/Framework/Tests/AssetCatalog.cpp @@ -302,15 +302,16 @@ namespace UnitTest { AZ::AllocatorInstance::Create(); + m_app.reset(aznew AzFramework::Application()); + AZ::ComponentApplication::Descriptor desc; + desc.m_useExistingAllocator = true; + AZ::SettingsRegistryInterface* registry = AZ::SettingsRegistry::Get(); auto projectPathKey = AZ::SettingsRegistryInterface::FixedValueString(AZ::SettingsRegistryMergeUtils::BootstrapSettingsRootKey) + "/project_path"; registry->Set(projectPathKey, "AutomatedTesting"); AZ::SettingsRegistryMergeUtils::MergeSettingsToRegistry_AddRuntimeFilePaths(*registry); - m_app.reset(aznew AzFramework::Application()); - AZ::ComponentApplication::Descriptor desc; - desc.m_useExistingAllocator = true; m_app->Start(desc); // Without this, the user settings component would attempt to save on finalize/shutdown. Since the file is