Fix crash in History dialog.

This commit is contained in:
Roman Telezhynskyi 2024-03-01 14:32:19 +02:00
parent 18545d6355
commit 9c8ba7f997

View File

@ -151,12 +151,15 @@ void DialogHistory::cellClicked(int row, int column)
else
{
QTableWidgetItem *item = ui->tableWidget->item(m_cursorToolRecordRow, 0);
if (item != nullptr)
{
auto id = qvariant_cast<quint32>(item->data(Qt::UserRole));
emit ShowHistoryTool(id, false);
}
m_cursorToolRecordRow = row;
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);
}
}