We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c3fac17 commit 769ef0fCopy full SHA for 769ef0f
src/components/cansignalsender/gui/cansignalsenderguiimpl.h
@@ -49,7 +49,14 @@ class SigIdDelegate : public QStyledItemDelegate {
49
50
if (_db.getDb().count(id)) {
51
auto ndx = _model->index(index.row(), 1);
52
- _model->setData(ndx, _db.getDb().at(id).front().signal_name.c_str(), Qt::EditRole);
+ auto& sigVec = _db.getDb().at(id);
53
+
54
+ if (sigVec.size()) {
55
+ _model->setData(ndx, sigVec.front().signal_name.c_str(), Qt::EditRole);
56
+ } else {
57
+ _model->setData(ndx, "", Qt::EditRole);
58
+ cds_error("No signals found for message {}", text.toStdString());
59
+ }
60
} else {
61
cds_error("No signals for selected id 0x{:03x}", id);
62
}
0 commit comments