Skip to content

Commit

Permalink
fixed case where Root Flow wouldn't be properly finished and cleaned up
Browse files Browse the repository at this point in the history
bug reported and fixed by BorMor
  • Loading branch information
MothDoctor committed Dec 19, 2021
1 parent eb6233d commit eb398d3
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions Source/Flow/Private/FlowAsset.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -412,9 +412,16 @@ void UFlowAsset::FinishNode(UFlowNode* Node)
ActiveNodes.Remove(Node);

// if graph reached Finish and this asset instance was created by SubGraph node
if (Node->GetClass()->IsChildOf(UFlowNode_Finish::StaticClass()) && NodeOwningThisAssetInstance.IsValid())
if (Node->GetClass()->IsChildOf(UFlowNode_Finish::StaticClass()))
{
NodeOwningThisAssetInstance.Get()->TriggerFirstOutput(true);
if (NodeOwningThisAssetInstance.IsValid())
{
NodeOwningThisAssetInstance.Get()->TriggerFirstOutput(true);
}
else
{
FinishFlow(EFlowFinishPolicy::Keep);
}
}
}
}
Expand Down

0 comments on commit eb398d3

Please sign in to comment.