diff --git a/src/BizHawk.Client.EmuHawk/tools/BasicBot/BasicBot.Designer.cs b/src/BizHawk.Client.EmuHawk/tools/BasicBot/BasicBot.Designer.cs
index 3eb0b62e6d..077cf892d3 100644
--- a/src/BizHawk.Client.EmuHawk/tools/BasicBot/BasicBot.Designer.cs
+++ b/src/BizHawk.Client.EmuHawk/tools/BasicBot/BasicBot.Designer.cs
@@ -9,19 +9,6 @@ partial class BasicBot
///
private System.ComponentModel.IContainer components = null;
- ///
- /// Clean up any resources being used.
- ///
- /// true if managed resources should be disposed; otherwise, false.
- protected override void Dispose(bool disposing)
- {
- if (disposing && (components != null))
- {
- components.Dispose();
- }
- base.Dispose(disposing);
- }
-
#region Windows Form Designer generated code
///
diff --git a/src/BizHawk.Client.EmuHawk/tools/BasicBot/BasicBot.cs b/src/BizHawk.Client.EmuHawk/tools/BasicBot/BasicBot.cs
index 661ce4034f..62aed29b75 100644
--- a/src/BizHawk.Client.EmuHawk/tools/BasicBot/BasicBot.cs
+++ b/src/BizHawk.Client.EmuHawk/tools/BasicBot/BasicBot.cs
@@ -1076,7 +1076,11 @@ private string CanStart()
protected override void Dispose(bool disposing)
{
- if (_isBotting) RestoreConfigFlags(); // disposed while running? least we can do is not clobber config
+ if (disposing)
+ {
+ components?.Dispose();
+ if (_isBotting) RestoreConfigFlags(); // disposed while running? least we can do is not clobber config
+ }
base.Dispose(disposing: disposing);
}