qmlpreview: fix crash while closing

Change-Id: Iee1083ff7c3e2e6dd511f1d54d72681e402d6c24
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
This commit is contained in:
Tim Jenssen
2020-07-20 16:31:14 +02:00
parent cb13e84656
commit 7144312358

View File

@@ -222,7 +222,7 @@ QWidget *SwitchLanguageComboboxAction::createWidget(QWidget *parent)
comboBox->addItem(tr("Default")); comboBox->addItem(tr("Default"));
auto refreshComboBoxFunction = [this, comboBox, toolTip] (ProjectExplorer::Project *project) { auto refreshComboBoxFunction = [this, comboBox, toolTip] (ProjectExplorer::Project *project) {
if (comboBox) { if (comboBox && project) {
QString errorMessage; QString errorMessage;
auto locales = project->availableQmlPreviewTranslations(&errorMessage); auto locales = project->availableQmlPreviewTranslations(&errorMessage);
if (!errorMessage.isEmpty()) if (!errorMessage.isEmpty())