forked from qt-creator/qt-creator
McuSupport: Fix crash
The function updateStatusUi is modifying children of the main widget. In case the package changes when the MCU dialog is not present anymore it tries to access invalid widget pointers. Change-Id: I9127114caf03b4ea047b075e875f20bb3e0c02b4 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -259,7 +259,7 @@ QWidget *McuPackage::widget()
|
|||||||
|
|
||||||
m_fileChooser->setFilePath(m_path);
|
m_fileChooser->setFilePath(m_path);
|
||||||
|
|
||||||
QObject::connect(this, &McuPackage::statusChanged, this, [this] { updateStatusUi(); });
|
QObject::connect(this, &McuPackage::statusChanged, widget, [this] { updateStatusUi(); });
|
||||||
|
|
||||||
QObject::connect(m_fileChooser, &PathChooser::textChanged, this, [this] {
|
QObject::connect(m_fileChooser, &PathChooser::textChanged, this, [this] {
|
||||||
updatePath();
|
updatePath();
|
||||||
|
Reference in New Issue
Block a user