forked from qt-creator/qt-creator
ProjectWizardPage: Handle null pointer correctly
Change-Id: I212ea6a177d7364778c28e30225c6f0da926bbd2 Reviewed-by: hjk <hjk@theqtcompany.com>
This commit is contained in:
@@ -384,7 +384,7 @@ bool ProjectWizardPage::expandTree(const QModelIndex &root)
|
|||||||
|
|
||||||
void ProjectWizardPage::setBestNode(AddNewTree *tree)
|
void ProjectWizardPage::setBestNode(AddNewTree *tree)
|
||||||
{
|
{
|
||||||
QModelIndex index = m_model->indexFromItem(tree);
|
QModelIndex index = tree ? m_model->indexFromItem(tree) : QModelIndex();
|
||||||
m_ui->projectComboBox->setCurrentIndex(index);
|
m_ui->projectComboBox->setCurrentIndex(index);
|
||||||
|
|
||||||
while (index.isValid()) {
|
while (index.isValid()) {
|
||||||
|
Reference in New Issue
Block a user