Fixed crash when lazy object ptr for render component is invalid when landscape collision scene proxy is created

#rb enrique.garciaamezcu
[FYI] nickolas.drake
#rnx

#ROBOMERGE-OWNER: jonathan.bard
#ROBOMERGE-AUTHOR: jonathan.bard
#ROBOMERGE-COMMAND: _robomerge[bot4] UE5-MAIN
#ROBOMERGE-SOURCE: CL 21161099 via CL 21161582 via CL 21166421
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v972-20964824)

[CL 21167587 by jonathan bard in ue5-main branch]
This commit is contained in:
jonathan bard
2022-07-19 17:34:31 -04:00
parent 7558174421
commit 3fdfed21af

View File

@@ -627,7 +627,7 @@ FPrimitiveSceneProxy* ULandscapeHeightfieldCollisionComponent::CreateSceneProxy(
switch (static_cast<EHeightfieldSource>(CVarLandscapeShowCollisionMesh.GetValueOnAnyThread()))
{
case EHeightfieldSource::Simple:
if (RenderComponent->SimpleCollisionMipLevel > RenderComponent->CollisionMipLevel)
if (RenderComponent.IsValid() && (RenderComponent->SimpleCollisionMipLevel > RenderComponent->CollisionMipLevel))
{
if (HeightfieldRef->HeightfieldSimple.IsValid())
{