Handle model mix conversion with invalid sources
This commit is contained in:
@@ -343,8 +343,10 @@ RawSource RawSource::convert(RadioDataConversionState & cstate)
|
||||
if (type == SOURCE_TYPE_STICK) {
|
||||
QStringList fromStickList(getStickList(cstate.fromBoard));
|
||||
QStringList toStickList(getStickList(cstate.toBoard));
|
||||
index = toStickList.indexOf(fromStickList.at(oldData.id));
|
||||
// index set to -1 if no match found
|
||||
if (oldData.id < fromStickList.count())
|
||||
index = toStickList.indexOf(fromStickList.at(oldData.id));
|
||||
else
|
||||
index = -1;
|
||||
// perform forced mapping
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user