From 6eafdf7156a13c89d7ec0c64ed3065d3f53aa980 Mon Sep 17 00:00:00 2001 From: tom_mai78101 Date: Fri, 22 Jul 2022 15:35:17 -0400 Subject: [PATCH] Fixed issue where the Copy button in Basic Bot is not toggled on/off properly. If the Copy button is enabled, but there is no best attempt recorded, it will crash BasicBot / EmuHawk if it attempts to copy a null Log of the best attempt. --- src/BizHawk.Client.EmuHawk/tools/BasicBot/BasicBot.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/BizHawk.Client.EmuHawk/tools/BasicBot/BasicBot.cs b/src/BizHawk.Client.EmuHawk/tools/BasicBot/BasicBot.cs index 1276946d66..96b81a6ea5 100644 --- a/src/BizHawk.Client.EmuHawk/tools/BasicBot/BasicBot.cs +++ b/src/BizHawk.Client.EmuHawk/tools/BasicBot/BasicBot.cs @@ -958,6 +958,7 @@ namespace BizHawk.Client.EmuHawk } BestAttemptLogLabel.Text = sb.ToString(); PlayBestButton.Enabled = true; + btnCopyBestInput.Enabled = true; } else { @@ -969,6 +970,7 @@ namespace BizHawk.Client.EmuHawk BestTieBreak3Box.Text = ""; BestAttemptLogLabel.Text = ""; PlayBestButton.Enabled = false; + btnCopyBestInput.Enabled = false; } }