Commit 171abe87 authored by John Tapsell's avatar John Tapsell
Browse files

Fix crash if there is bad data

I do not know if this is the cause for BUG 235855, but it can't hurt to have the extra check

BUG:235855
parent b2a11107
......@@ -308,7 +308,7 @@ ListView::answerReceived(int id, const QList<QByteArray>& answer)
case 19: {
for (int i = 0; i < answer.count(); i++) {
KSGRD::SensorTokenizer records(answer[i], '\t');
for (uint j = 0; j < records.count(); j++) {
for (uint j = 0; j < records.count() && j < mColumnTypes.count(); j++) {
QStandardItem *item = new QStandardItem();
item->setEditable(false);
switch( mColumnTypes[j] ) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment