projects
/
pulseview.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
30bb6ca
)
DecodeTrace: Don't dereference iterator pointing at end of container.
author
Tilman Sauerbeck
<tilman@code-monkey.de>
Wed, 2 Dec 2015 18:45:12 +0000
(19:45 +0100)
committer
Tilman Sauerbeck
<tilman@code-monkey.de>
Wed, 2 Dec 2015 18:45:12 +0000
(19:45 +0100)
pv/view/decodetrace.cpp
patch
|
blob
|
history
diff --git
a/pv/view/decodetrace.cpp
b/pv/view/decodetrace.cpp
index 38cbecb85337500cf3c20ca5963aa769918bb728..020ce77090acd4d86bc06ba49185be1282106a02 100644
(file)
--- a/
pv/view/decodetrace.cpp
+++ b/
pv/view/decodetrace.cpp
@@
-733,7
+733,9
@@
QComboBox* DecodeTrace::create_channel_selector(
{
selector->addItem(s->name(),
qVariantFromValue((void*)s.get()));
- if ((*channel_iter).second == s)
+
+ if (channel_iter != dec->channels().end() &&
+ (*channel_iter).second == s)
selector->setCurrentIndex(
selector->count() - 1);
}