forked from qt-creator/qt-creator
QmlPreview: Fix crash at shutdown
Seem like it get a nullptr project at shutdown. Change-Id: I76d9f4b2b90b0641d645cb413f9ebfe678bb1c9f Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
@@ -115,7 +115,10 @@ ProjectFileSelectionsWidget::ProjectFileSelectionsWidget(const QString &projectS
|
||||
layout->setContentsMargins(0, 0, 0, 0);
|
||||
layout->addLayout(viewLayout);
|
||||
|
||||
auto initModel = [this, model, updateCheckedFiles] (ProjectExplorer::Project *project) {
|
||||
auto initModel = [this, model, updateCheckedFiles](ProjectExplorer::Project *project) {
|
||||
if (!project)
|
||||
return;
|
||||
|
||||
auto refreshModel = [this, model, updateCheckedFiles] () {
|
||||
model->clear();
|
||||
if (auto project = ProjectExplorer::SessionManager::startupProject()) {
|
||||
|
Reference in New Issue
Block a user