From d78cb9878e5bf813cae94b83a9c48964ee54c8ed Mon Sep 17 00:00:00 2001 From: Collin Kidder Date: Sun, 23 May 2021 11:19:59 -0400 Subject: [PATCH] Fix for another DBC related crash --- dbc/dbchandler.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/dbc/dbchandler.cpp b/dbc/dbchandler.cpp index 07a5bae..06668ec 100644 --- a/dbc/dbchandler.cpp +++ b/dbc/dbchandler.cpp @@ -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! + } } }