Skip to content
Snippets Groups Projects
Commit ceaa3e74 authored by Thomas Hartmann's avatar Thomas Hartmann
Browse files

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
No related branches found
No related tags found
No related merge requests found
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment