aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRainer Keller <Rainer.Keller@qt.io>2022-10-18 13:37:09 +0200
committerRainer Keller <Rainer.Keller@qt.io>2022-10-24 10:49:28 +0000
commit6c7616de1b639ff6c2f1a2337c5fe1417cf9d2bb (patch)
tree96b84eadfa6839ceb993325e5a86e661b34968d0
parent72c1c891fa0ee374d0d77c4918617a6968b5fcba (diff)
McuSupport: Avoid accessing invalid pointer
After the options dialog has been closed, all widgets are deleted but the m_fileChooser will not be set to nullptr again. Avoiding to use the widgets for data based accesses. Change-Id: I5d99fc4a34ecd9d22e26854c6956e9c0116de94b Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Christian Stenger <christian.stenger@qt.io>
-rw-r--r--src/plugins/mcusupport/mcupackage.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/mcusupport/mcupackage.cpp b/src/plugins/mcusupport/mcupackage.cpp
index 2b03a696c19..67b5f2091a1 100644
--- a/src/plugins/mcusupport/mcupackage.cpp
+++ b/src/plugins/mcusupport/mcupackage.cpp
@@ -93,7 +93,7 @@ const McuPackageVersionDetector *McuPackage::getVersionDetector() const
FilePath McuPackage::basePath() const
{
- return m_fileChooser != nullptr ? m_fileChooser->filePath() : m_path;
+ return m_path;
}
FilePath McuPackage::path() const