mirror of
https://github.com/aelurum/AssetStudio.git
synced 2026-11-15 19:28:48 -05:00
Fix null reference exception when bone frame is not found
This commit is contained in:
@@ -228,20 +228,19 @@ namespace AssetStudio.FbxInterop
|
|||||||
|
|
||||||
foreach (var bone in boneList)
|
foreach (var bone in boneList)
|
||||||
{
|
{
|
||||||
|
var cluster = IntPtr.Zero;
|
||||||
if (bone.Path != null)
|
if (bone.Path != null)
|
||||||
{
|
{
|
||||||
var frame = rootFrame.FindFrameByPath(bone.Path);
|
var frame = rootFrame.FindFrameByPath(bone.Path);
|
||||||
var boneNode = _frameToNode[frame];
|
|
||||||
|
|
||||||
var cluster = AsFbxMeshCreateCluster(_pContext, boneNode);
|
if (frame != null)
|
||||||
|
|
||||||
AsFbxMeshAddCluster(pClusterArray, cluster);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
AsFbxMeshAddCluster(pClusterArray, IntPtr.Zero);
|
var boneNode = _frameToNode[frame];
|
||||||
|
cluster = AsFbxMeshCreateCluster(_pContext, boneNode);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
AsFbxMeshAddCluster(pClusterArray, cluster);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var mesh = AsFbxMeshCreateMesh(_pContext, frameNode);
|
var mesh = AsFbxMeshCreateMesh(_pContext, frameNode);
|
||||||
|
|||||||
Reference in New Issue
Block a user