From ba4e99d8d2ea8c20be9708952026d4298a17a175 Mon Sep 17 00:00:00 2001 From: Nav Date: Fri, 24 Dec 2021 13:59:34 +0000 Subject: [PATCH] Fixed illegal memory access bug with pane widgets and the target package widget. --- src/Insight/UserInterfaces/InsightWindow/InsightWindow.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/Insight/UserInterfaces/InsightWindow/InsightWindow.cpp b/src/Insight/UserInterfaces/InsightWindow/InsightWindow.cpp index a0cc4921..6cf994cb 100644 --- a/src/Insight/UserInterfaces/InsightWindow/InsightWindow.cpp +++ b/src/Insight/UserInterfaces/InsightWindow/InsightWindow.cpp @@ -15,8 +15,6 @@ #include "src/Helpers/Paths.hpp" #include "src/Targets/TargetDescriptor.hpp" -#include "AboutWindow.hpp" - using namespace Bloom; using namespace Bloom::Exceptions; using namespace Bloom::Widgets; @@ -502,6 +500,8 @@ void InsightWindow::destroyPanes() { if (this->ramInspectionPane != nullptr) { this->ramInspectionPane->deactivate(); this->ramInspectionPane->deleteLater(); + this->ramInspectionPane = nullptr; + this->bottomPanel->setVisible(false); this->ramInspectionButton->setChecked(false); this->ramInspectionButton->setDisabled(true); @@ -510,6 +510,8 @@ void InsightWindow::destroyPanes() { if (this->eepromInspectionPane != nullptr) { this->eepromInspectionPane->deactivate(); this->eepromInspectionPane->deleteLater(); + this->eepromInspectionPane = nullptr; + this->bottomPanel->setVisible(false); this->eepromInspectionButton->setChecked(false); this->eepromInspectionButton->setDisabled(true); @@ -526,6 +528,7 @@ void InsightWindow::deactivate() { this->targetPackageWidget->hide(); this->targetPackageWidget->deleteLater(); this->targetPackageWidget = nullptr; + this->ioContainerWidget->setPackageWidget(this->targetPackageWidget); } this->destroyPanes();