forked from qt-creator/qt-creator
Wizards: crash fix
In the case of cancel currentItem is null. Change-Id: I337bcf9e1873e9f6525c898c7275ec594f9baeb6 Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
This commit is contained in:
@@ -333,7 +333,9 @@ Core::IWizard *NewDialog::showDialog()
|
||||
const int retVal = exec();
|
||||
|
||||
idx = m_ui->templateCategoryView->currentIndex();
|
||||
lastCategory = m_model->itemFromIndex(m_twoLevelProxyModel->mapToSource(idx))->data(Qt::UserRole).toString();
|
||||
QStandardItem *currentItem = m_model->itemFromIndex(m_twoLevelProxyModel->mapToSource(idx));
|
||||
if (currentItem)
|
||||
lastCategory = currentItem->data(Qt::UserRole).toString();
|
||||
|
||||
if (retVal != Accepted)
|
||||
return 0;
|
||||
|
Reference in New Issue
Block a user