fix bug when Msg ID is not set in DBC Editing Window

This commit is contained in:
canpadawan
2016-05-31 14:50:50 +02:00
parent 77031f1310
commit 90a0fb401b
+4 -1
View File
@@ -382,7 +382,9 @@ void DBCMainEditor::onCellClickedMessage(int row, int col)
{
if (col == 3) //3 is the signals field. If clicked we go to the signals dialog
{
QString idString = ui->MessagesTable->item(row, 0)->text();
QTableWidgetItem* msg = ui->MessagesTable->item(row, 0);
if(msg) {
QString idString = msg->text();
DBC_MESSAGE *message = dbcFile->messageHandler->findMsgByID(Utility::ParseStringToNum(idString));
sigEditor->setMessageRef(message);
sigEditor->setFileIdx(fileIdx);
@@ -394,6 +396,7 @@ void DBCMainEditor::onCellClickedMessage(int row, int col)
inhibitCellChanged = false;
}
}
}
void DBCMainEditor::refreshNodesTable()
{