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>
This commit is contained in:
Rainer Keller
2022-10-18 13:37:09 +02:00
parent 72c1c891fa
commit 6c7616de1b

View File

@@ -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