From 74a9ed5a6bd6dda00a162d9bc6422f7c3d56be30 Mon Sep 17 00:00:00 2001 From: Ed Gonzalez Date: Thu, 3 Sep 2015 12:42:44 -0500 Subject: [PATCH] Handle radio disconnect --- pc/CODEC2 GUI/CODEC2 GUI/MainForm.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pc/CODEC2 GUI/CODEC2 GUI/MainForm.cs b/pc/CODEC2 GUI/CODEC2 GUI/MainForm.cs index f12abf5..7766630 100644 --- a/pc/CODEC2 GUI/CODEC2 GUI/MainForm.cs +++ b/pc/CODEC2 GUI/CODEC2 GUI/MainForm.cs @@ -122,6 +122,13 @@ namespace CODEC2_GUI void API_RadioRemoved(Radio radio) { + _radio.SliceAdded -= _radio_SliceAdded; + _radio.SliceRemoved -= _radio_SliceRemoved; + + _radio.Disconnect(); + + _radio = null; + _radioConnected = false; } //*************************************