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) {
|
if (type == SOURCE_TYPE_STICK) {
|
||||||
QStringList fromStickList(getStickList(cstate.fromBoard));
|
QStringList fromStickList(getStickList(cstate.fromBoard));
|
||||||
QStringList toStickList(getStickList(cstate.toBoard));
|
QStringList toStickList(getStickList(cstate.toBoard));
|
||||||
index = toStickList.indexOf(fromStickList.at(oldData.id));
|
if (oldData.id < fromStickList.count())
|
||||||
// index set to -1 if no match found
|
index = toStickList.indexOf(fromStickList.at(oldData.id));
|
||||||
|
else
|
||||||
|
index = -1;
|
||||||
// perform forced mapping
|
// perform forced mapping
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user