From 4e18c6cfe03bf97673d3939d3584205fcaa2adc9 Mon Sep 17 00:00:00 2001 From: factubsio <65080026+factubsio@users.noreply.github.com> Date: Sat, 18 Mar 2023 22:25:46 +0000 Subject: [PATCH] fix bug where BlueprintControl has an event handler that outlives itself --- BlueprintExplorer/BlueprintControl.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/BlueprintExplorer/BlueprintControl.cs b/BlueprintExplorer/BlueprintControl.cs index f4013f0..fe721e3 100644 --- a/BlueprintExplorer/BlueprintControl.cs +++ b/BlueprintExplorer/BlueprintControl.cs @@ -300,6 +300,12 @@ private void BubblePrints_OnSettingsChanged() ValidateBlueprint(false); } + protected override void Dispose(bool disposing) + { + BubblePrints.OnSettingsChanged -= BubblePrints_OnSettingsChanged; + base.Dispose(disposing); + } + protected override void OnBackColorChanged(EventArgs e) => UpdateRowHoverColor(); private void UpdateRowHoverColor()