Browse Source

Prevent eventhandlers no longer when the flowchart is disabled as per #679

master
desktop-maesty/steve 7 years ago
parent
commit
46de711460
  1. 6
      Assets/Fungus/Scripts/Components/EventHandler.cs

6
Assets/Fungus/Scripts/Components/EventHandler.cs

@ -65,6 +65,12 @@ namespace Fungus
var flowchart = ParentBlock.GetFlowchart(); var flowchart = ParentBlock.GetFlowchart();
//if somehow the flowchart is invalid or has been disabled we don't want to continue
if(flowchart == null || !flowchart.isActiveAndEnabled)
{
return false;
}
// Auto-follow the executing block if none is currently selected // Auto-follow the executing block if none is currently selected
if (flowchart.SelectedBlock == null) if (flowchart.SelectedBlock == null)
{ {

Loading…
Cancel
Save