crash fix

This commit is contained in:
Asval 2024-05-04 23:48:32 +02:00
parent ca95df2dd4
commit 7e69adf978
3 changed files with 3 additions and 3 deletions

@ -1 +1 @@
Subproject commit fb9413d0362457867e0c46c339ab3756c2b0a399
Subproject commit 8360aeea93df67272069f2a2f9e100272c18560e

View File

@ -49,7 +49,7 @@ public class SkeletalModel : UModel
{
foreach (var skeletalBodySetup in physicsAsset.SkeletalBodySetups)
{
if (!skeletalBodySetup.TryLoad(out USkeletalBodySetup bodySetup)) continue;
if (!skeletalBodySetup.TryLoad(out USkeletalBodySetup bodySetup) || bodySetup.AggGeom == null) continue;
foreach (var convexElem in bodySetup.AggGeom.ConvexElems)
{
Collisions.Add(new Collision(convexElem));

View File

@ -53,7 +53,7 @@ public class StaticModel : UModel
public StaticModel(UStaticMesh export, CStaticMesh staticMesh, Transform transform = null)
: base(export, staticMesh.LODs[LodLevel], export.Materials, staticMesh.LODs[LodLevel].Verts, staticMesh.LODs.Count, transform)
{
if (export.BodySetup.TryLoad(out UBodySetup bodySetup))
if (export.BodySetup.TryLoad(out UBodySetup bodySetup) && bodySetup.AggGeom != null)
{
foreach (var convexElem in bodySetup.AggGeom.ConvexElems)
{