Fix crash in History dialog.
This commit is contained in:
parent
18545d6355
commit
9c8ba7f997
|
@ -151,12 +151,15 @@ void DialogHistory::cellClicked(int row, int column)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
QTableWidgetItem *item = ui->tableWidget->item(m_cursorToolRecordRow, 0);
|
QTableWidgetItem *item = ui->tableWidget->item(m_cursorToolRecordRow, 0);
|
||||||
|
if (item != nullptr)
|
||||||
|
{
|
||||||
auto id = qvariant_cast<quint32>(item->data(Qt::UserRole));
|
auto id = qvariant_cast<quint32>(item->data(Qt::UserRole));
|
||||||
emit ShowHistoryTool(id, false);
|
emit ShowHistoryTool(id, false);
|
||||||
|
}
|
||||||
|
|
||||||
m_cursorToolRecordRow = row;
|
m_cursorToolRecordRow = row;
|
||||||
item = ui->tableWidget->item(m_cursorToolRecordRow, 0);
|
item = ui->tableWidget->item(m_cursorToolRecordRow, 0);
|
||||||
id = qvariant_cast<quint32>(item->data(Qt::UserRole));
|
auto id = qvariant_cast<quint32>(item->data(Qt::UserRole));
|
||||||
emit ShowHistoryTool(id, true);
|
emit ShowHistoryTool(id, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user