Commit ceaa3e74 authored by Thomas Hartmann's avatar Thomas Hartmann

Wizards: crash fix

In the case of cancel currentItem is null.

Change-Id: I337bcf9e1873e9f6525c898c7275ec594f9baeb6
Reviewed-by: default avatarDaniel Teske <daniel.teske@nokia.com>
parent d97768f9
......@@ -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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment