Skip to content

Commit

Permalink
Merged PR 707: Adding extra checks to FUXToolsEditorModule::ShutdownM…
Browse files Browse the repository at this point in the history
…odule.

I wasn't able to issue the packaging failure referenced in: #1024

But, based on the way other modules shutdown this looked like a sane check to perform.

Related work items: #1024
  • Loading branch information
Cameron-Micka committed Mar 11, 2021
1 parent ffb88ce commit 239a98d
Showing 1 changed file with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,13 @@ void FUXToolsEditorModule::ShutdownModule()
GUnrealEd->UnregisterComponentVisualizer(UUxtPressableButtonComponent::StaticClass()->GetFName());
}

// Unregister customizations
FPropertyEditorModule& PropertyModule = FModuleManager::LoadModuleChecked<FPropertyEditorModule>("PropertyEditor");
PropertyModule.UnregisterCustomPropertyTypeLayout(FUxtIconBrush::StaticStruct()->GetFName());
PropertyModule.UnregisterCustomClassLayout(UUxtConstrainableComponent::StaticClass()->GetFName());
if (UObjectInitialized() && FModuleManager::Get().IsModuleLoaded(TEXT("PropertyEditor")))
{
// Unregister customizations
FPropertyEditorModule& PropertyModule = FModuleManager::LoadModuleChecked<FPropertyEditorModule>("PropertyEditor");
PropertyModule.UnregisterCustomPropertyTypeLayout(FUxtIconBrush::StaticStruct()->GetFName());
PropertyModule.UnregisterCustomClassLayout(UUxtConstrainableComponent::StaticClass()->GetFName());
}
}

#undef LOCTEXT_NAMESPACE

0 comments on commit 239a98d

Please sign in to comment.