Don't operate on UObjects during object destruction, prefer doing so inside BeginDestroy instead.

#jira UE-185154
#rb trivial
#rnx
#preflight 6454789f023fe5d3ad643909

[CL 25347759 by halfdan ingvarsson in ue5-main branch]
This commit is contained in:
halfdan ingvarsson
2023-05-04 23:50:22 -04:00
parent 2d5298419c
commit a09bfb54ca
2 changed files with 4 additions and 3 deletions

View File

@@ -78,8 +78,10 @@ ULevelVariantSets::ULevelVariantSets(const FObjectInitializer& ObjectInitializer
#endif
}
ULevelVariantSets::~ULevelVariantSets()
void ULevelVariantSets::BeginDestroy()
{
Super::BeginDestroy();
#if WITH_EDITOR
UnsubscribeToEditorDelegates();
UnsubscribeToDirectorCompiled();

View File

@@ -18,9 +18,8 @@ class VARIANTMANAGERCONTENT_API ULevelVariantSets : public UObject
public:
~ULevelVariantSets();
// UObject interface
virtual void BeginDestroy() override;
virtual void Serialize(FArchive& Ar) override;
//~ End UObject interface