Fix for another DBC related crash

This commit is contained in:
Collin Kidder
2021-05-23 11:19:59 -04:00
parent a1923f132b
commit d78cb9878e
+5 -1
View File
@@ -1100,11 +1100,15 @@ bool DBCFile::loadFile(QString fileName)
//if this doesn't have a multiplex parent set but is multiplexed then it must have used
//simple multiplexing instead of any extended specification. So, fill in the multiplexor signal here
//and also write the extended entry for it too.
if (sig->isMultiplexed && (sig->multiplexParent == nullptr) )
if (sig->isMultiplexed && (sig->multiplexParent == nullptr) && (msg->multiplexorSignal) )
{
sig->multiplexParent = msg->multiplexorSignal;
msg->multiplexorSignal->multiplexedChildren.append(sig);
}
if ( sig->isMultiplexed && (!msg->multiplexorSignal) ) //marked multiplexed but there is no multiplexor.
{
sig->isMultiplexed = false; //can't multiplex if there is no multiplexor!
}
}
}