projects
/
pulseview.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
98bac96
)
Fixed PD list, so that it doesn't crash when empty
author
Joel Holdsworth
<joel@airwebreathe.org.uk>
Wed, 9 Oct 2013 21:17:45 +0000
(22:17 +0100)
committer
Joel Holdsworth
<joel@airwebreathe.org.uk>
Wed, 9 Oct 2013 21:18:21 +0000
(22:18 +0100)
pv/mainwindow.cpp
patch
|
blob
|
history
diff --git
a/pv/mainwindow.cpp
b/pv/mainwindow.cpp
index 0e971ce06cc7373f6da132479483101f187aa3c7..ba232e25d0cb5afae12d5bb3f80a09f6b2fe3714 100644
(file)
--- a/
pv/mainwindow.cpp
+++ b/
pv/mainwindow.cpp
@@
-305,14
+305,15
@@
void MainWindow::setup_add_decoders(QMenu *parent)
{
GSList *l = g_slist_sort(g_slist_copy(
(GSList*)srd_decoder_list()), decoder_name_cmp);
- do {
+ for(; l; l = l->next)
+ {
QAction *const action = parent->addAction(QString(
((srd_decoder*)l->data)->name));
action->setData(qVariantFromValue(l->data));
_decoders_add_mapper.setMapping(action, action);
connect(action, SIGNAL(triggered()),
&_decoders_add_mapper, SLOT(map()));
- }
while ((l = l->next));
+ }
g_slist_free(l);
}