You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
[INTEGRATE] Change 2446219 by Dan.Oconnor@epic_3298 on 2015/02/14 21:11:35
[UE-9497] Clear the blueprint's generated class's CDO before deleting the blueprint, otherwise it gets redirected to the replacing type and that causes a an assertion #lockdown Nick.Whiting [CL 2449925 by Matthew Griffin in Main branch]
This commit is contained in:
@@ -802,6 +802,14 @@ namespace ObjectTools
|
||||
UPackage* CurObjPackage = CurObjToConsolidate->GetOutermost();
|
||||
FName CurObjName = CurObjToConsolidate->GetFName();
|
||||
|
||||
// null out the CDO of our current generated class so that DeleteSingleObject does not find it and set it's ClassGeneratedBy to the replacing type.
|
||||
// That would trigger a type mismatch assertion...
|
||||
UBlueprint* BlueprintToConsolidate = Cast<UBlueprint>(CurObjToConsolidate);
|
||||
if (BlueprintToConsolidateTo != nullptr && BlueprintToConsolidate != nullptr && BlueprintToConsolidate->GeneratedClass != nullptr)
|
||||
{
|
||||
BlueprintToConsolidate->GeneratedClass->ClassDefaultObject = nullptr;
|
||||
}
|
||||
|
||||
// Attempt to delete the object that was consolidated
|
||||
if ( DeleteSingleObject( CurObjToConsolidate ) )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user