diff --git a/InteractiveAutomationToolkit/InteractiveController.cs b/InteractiveAutomationToolkit/InteractiveController.cs index 4c33a8b..b404d79 100644 --- a/InteractiveAutomationToolkit/InteractiveController.cs +++ b/InteractiveAutomationToolkit/InteractiveController.cs @@ -96,7 +96,15 @@ public void Run(Dialog startDialog) else { CurrentDialog = nextDialog; - CurrentDialog.Show(); + if (CurrentDialog == null) + { + IsRunning = false; + IsManualMode = false; + } + else + { + CurrentDialog.Show(); + } } } catch (Exception) @@ -170,6 +178,7 @@ public void Update() public void Hide() { Engine.HideUI(); + nextDialog = null; } private void RunManualAction()