Skip to content

Commit 3cbf252

Browse files
committed
- Fixed crash after multiple Play In Editor sessions, or when PIE after refining proxies.
1 parent d6af779 commit 3cbf252

File tree

1 file changed

+2
-11
lines changed

1 file changed

+2
-11
lines changed

Source/HoudiniEngineEditor/Private/HoudiniEngineCommands.cpp

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1671,11 +1671,10 @@ FHoudiniEngineCommands::TriageHoudiniAssetComponentsForProxyMeshRefinement(UHoud
16711671
if (!IsValid(ProxyObject))
16721672
continue;
16731673

1674+
// Just mark the object as garbage and his package as dirty
1675+
// Do not save the package automatically - as will cause crashes in PIE
16741676
ProxyObject->MarkAsGarbage();
16751677
ProxyObject->MarkPackageDirty();
1676-
UPackage* const Package = ProxyObject->GetPackage();
1677-
if (IsValid(Package))
1678-
ProxyMeshPackagesToSave.Add(Package);
16791678
}
16801679
}
16811680
}
@@ -1708,14 +1707,6 @@ FHoudiniEngineCommands::TriageHoudiniAssetComponentsForProxyMeshRefinement(UHoud
17081707
{
17091708
TryCollectGarbage(GARBAGE_COLLECTION_KEEPFLAGS);
17101709

1711-
// TODO: Try to prevent potential crash upon multiple successive PIE
1712-
for (int nIdx = ProxyMeshPackagesToSave.Num() - 1; nIdx >= 0; nIdx--)
1713-
{
1714-
UPackage* CurPackage = ProxyMeshPackagesToSave[nIdx];
1715-
if (!IsValid(CurPackage) || !CurPackage->IsDirty())
1716-
ProxyMeshPackagesToSave.RemoveAt(nIdx);
1717-
}
1718-
17191710
FEditorFileUtils::PromptForCheckoutAndSave(ProxyMeshPackagesToSave, true, false);
17201711
}
17211712
}

0 commit comments

Comments
 (0)