From 6e23c445628f1e96300a93c8df568449858a21b7 Mon Sep 17 00:00:00 2001 From: Ahmad Chatila <47364209+chatilaah@users.noreply.github.com> Date: Wed, 18 Jan 2023 21:55:12 +0200 Subject: [PATCH] Fixed NullReferenceException when closing the form RosDBG/MainWindow.cs --- RosDBG/MainWindow.cs | 6 ++++++ RosDBG/Properties/AssemblyInfo.cs | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/RosDBG/MainWindow.cs b/RosDBG/MainWindow.cs index 73b5408..1b4cc2d 100644 --- a/RosDBG/MainWindow.cs +++ b/RosDBG/MainWindow.cs @@ -401,6 +401,12 @@ namespace RosDBG about.ShowDialog(this); } + protected override void OnFormClosing(FormClosingEventArgs e) + { + base.OnFormClosing(e); + dockPanel.ActiveDocumentChanged -= dockPanel_ActiveDocumentChanged; + } + private void dockPanel_ActiveDocumentChanged(object sender, EventArgs e) { try diff --git a/RosDBG/Properties/AssemblyInfo.cs b/RosDBG/Properties/AssemblyInfo.cs index ce2e795..9319d7e 100644 --- a/RosDBG/Properties/AssemblyInfo.cs +++ b/RosDBG/Properties/AssemblyInfo.cs @@ -39,5 +39,5 @@ using System.Runtime.InteropServices; // will be increased as well. MSI installers must not be generated with the same Build Number // otherwise they won't upgrade the old installation! -[assembly: AssemblyVersion("1.0.23.10")] -[assembly: AssemblyFileVersion("1.0.23.10")] +[assembly: AssemblyVersion("1.0.23.12")] +[assembly: AssemblyFileVersion("1.0.23.12")]