We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 57647aa commit 9f06f2aCopy full SHA for 9f06f2a
1 file changed
Editor/Utils/StateMachineModelUtils.cs
@@ -1,4 +1,5 @@
1
-using Nonatomic.VSM2.NodeGraph;
+using System;
2
+using Nonatomic.VSM2.NodeGraph;
3
using Nonatomic.VSM2.StateGraph;
4
5
namespace Nonatomic.VSM2.Editor.Utils
@@ -28,6 +29,9 @@ public static StateMachineModel UpdatePortDataInModel(StateMachineModel model)
28
29
30
public static PortModel UpdateTransitionPortDataFromState(StateNodeModel nodeModel, PortModel currentPortModel)
31
{
32
+ if (nodeModel == null) return currentPortModel;
33
+ if (!nodeModel.State) return currentPortModel;
34
+
35
var stateType = nodeModel.State.GetType();
36
37
var eventInfo = stateType.GetEvent(currentPortModel.Id);
0 commit comments