mirror of
https://github.com/4sval/FModel.git
synced 2026-09-24 09:15:51 -05:00
crash fix
This commit is contained in:
Submodule CUE4Parse updated: fb9413d036...8360aeea93
@@ -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));
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user