From: Uwe Hermann Date: Sun, 8 Sep 2013 17:59:05 +0000 (+0200) Subject: Fix issue with optional PD probes. X-Git-Tag: sigrok-cli-0.5.0~84 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=7058a9b8924047b6c3066e80397dcb789e10c9c4;p=sigrok-cli.git Fix issue with optional PD probes. Running (or showing info about) PDs with optional probes was not working and causing segfaults. The reason was a g_slist_concat() call that was applied to a list, whereas it needs to be applied to a copy of the list. This fixes #138. --- diff --git a/sigrok-cli.c b/sigrok-cli.c index 71c35b7..8521b95 100644 --- a/sigrok-cli.c +++ b/sigrok-cli.c @@ -1014,7 +1014,7 @@ static int probes_to_gvar(struct srd_decoder *dec, GHashTable *hash, (GDestroyNotify)g_variant_unref); all_probes = g_slist_copy(dec->probes); - all_probes = g_slist_concat(all_probes, dec->opt_probes); + all_probes = g_slist_concat(all_probes, g_slist_copy(dec->opt_probes)); for (l = all_probes; l; l = l->next) { p = l->data; if (!(val_str = g_hash_table_lookup(hash, p->id)))