Skip to content

Commit c10667e

Browse files
committed
Fix a null deref when visual debugging is showing a sub-tree node with no children
1 parent 6f8610d commit c10667e

File tree

1 file changed

+1
-1
lines changed
  • Assets/com.fluid.behavior-tree/Editor/BehaviorTree/Printer

1 file changed

+1
-1
lines changed

Assets/com.fluid.behavior-tree/Editor/BehaviorTree/Printer/VisualTask.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public VisualTask (ITask task, IGraphContainer parentContainer) {
2525

2626
AddBox(container);
2727

28-
if (task.Children != null) {
28+
if (task.Children != null && task.Children.Count > 0) {
2929
var childContainer = new GraphContainerHorizontal();
3030
foreach (var child in task.Children) {
3131
_children.Add(new VisualTask(child, childContainer));

0 commit comments

Comments
 (0)