ProjectWizardPage: Handle null pointer correctly

Change-Id: I212ea6a177d7364778c28e30225c6f0da926bbd2
Reviewed-by: hjk <hjk@theqtcompany.com>
This commit is contained in:
Daniel Teske
2015-01-13 12:48:05 +01:00
committed by hjk
parent 9e159d87a8
commit 54fda55b76

View File

@@ -384,7 +384,7 @@ bool ProjectWizardPage::expandTree(const QModelIndex &root)
void ProjectWizardPage::setBestNode(AddNewTree *tree)
{
QModelIndex index = m_model->indexFromItem(tree);
QModelIndex index = tree ? m_model->indexFromItem(tree) : QModelIndex();
m_ui->projectComboBox->setCurrentIndex(index);
while (index.isValid()) {