Skip to content

Commit 9f06f2a

Browse files
committed
.
1 parent 57647aa commit 9f06f2a

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

Editor/Utils/StateMachineModelUtils.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
using Nonatomic.VSM2.NodeGraph;
1+
using System;
2+
using Nonatomic.VSM2.NodeGraph;
23
using Nonatomic.VSM2.StateGraph;
34

45
namespace Nonatomic.VSM2.Editor.Utils
@@ -28,6 +29,9 @@ public static StateMachineModel UpdatePortDataInModel(StateMachineModel model)
2829

2930
public static PortModel UpdateTransitionPortDataFromState(StateNodeModel nodeModel, PortModel currentPortModel)
3031
{
32+
if (nodeModel == null) return currentPortModel;
33+
if (!nodeModel.State) return currentPortModel;
34+
3135
var stateType = nodeModel.State.GetType();
3236

3337
var eventInfo = stateType.GetEvent(currentPortModel.Id);

0 commit comments

Comments
 (0)