Fix Trigger Builder Msg ID crash and Frame Sender not triggering on receipt of specific message ID
- Fixed null pointer crash when accessing DBC message signals in Trigger Builder - Fixed Frame Sender window not properly triggering on incoming frames with specific message IDs - Added proper signal null checks and ID trigger condition handling - Incremented version to 242
This commit is contained in:
+15
-7
@@ -9,6 +9,9 @@ TriggerDialog::TriggerDialog(QList<Trigger> trigs, QWidget *parent) :
|
||||
ui->setupUi(this);
|
||||
triggers.clear();
|
||||
triggers.append(trigs); //make sure it's just a clone of the existing triggers
|
||||
|
||||
// Set wider minimum width for Msg ID combo box to accommodate extended IDs
|
||||
ui->cmMsgID->setMinimumWidth(250);
|
||||
|
||||
//if there are no triggers then create a default one
|
||||
if (triggers.count() == 0)
|
||||
@@ -184,15 +187,20 @@ void TriggerDialog::regenerateCurrentListItem()
|
||||
//the right message. Should at least search by message name instead
|
||||
//if possible.
|
||||
DBC_MESSAGE *msg = dbcHandler->findMessage(trig.ID);
|
||||
int numSigs = msg->sigHandler->getCount();
|
||||
for (int s = 0; s < numSigs; s++)
|
||||
if (msg)
|
||||
{
|
||||
DBC_SIGNAL *sig = msg->sigHandler->findSignalByIdx(s);
|
||||
|
||||
entries.append(sig->name);
|
||||
int numSigs = msg->sigHandler->getCount();
|
||||
for (int s = 0; s < numSigs; s++)
|
||||
{
|
||||
DBC_SIGNAL *sig = msg->sigHandler->findSignalByIdx(s);
|
||||
if (sig)
|
||||
{
|
||||
entries.append(sig->name);
|
||||
}
|
||||
}
|
||||
entries.sort();
|
||||
ui->cmSignal->addItems(entries);
|
||||
}
|
||||
entries.sort();
|
||||
ui->cmSignal->addItems(entries);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user