From f206db204174deba458ecc4f580725498d64faba Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Sat, 22 Feb 2020 10:34:11 +0100 Subject: [PATCH] Pcbnew: fix crash on exit after using the track length tool. This is due to the fact the PNS_TUNE_STATUS_POPUP was not hidden before calling its destructor. It is now fixed by setting its virtual destructor calling Hide(). TODO: see if it could be used for any class derived from STATUS_POPUP. (We already have this issue in other places) --- pcbnew/router/pns_tune_status_popup.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pcbnew/router/pns_tune_status_popup.h b/pcbnew/router/pns_tune_status_popup.h index 94f171d460..b2a14774d8 100644 --- a/pcbnew/router/pns_tune_status_popup.h +++ b/pcbnew/router/pns_tune_status_popup.h @@ -40,6 +40,10 @@ public: PNS_TUNE_STATUS_POPUP( EDA_DRAW_FRAME* aParent ) : STATUS_TEXT_POPUP( aParent ) { } + + // Ensure the widgets is hidden before deleting it + // Otherwise we have a crash + ~PNS_TUNE_STATUS_POPUP() override { Hide(); } void UpdateStatus( PNS::ROUTER* aRouter ); };