X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=decode.c;h=d27703929fe7d34a7e972627b87a5e0fd7d723e9;hb=69110b5cbe99a54937f108d239592e5afb55d008;hp=225162a45e4cde1238da788ec4e5c8754bd91f93;hpb=65cd80ade0cc8c569b13abd9a64dbe48b0d8fdfa;p=sigrok-cli.git diff --git a/decode.c b/decode.c index 225162a..d277039 100644 --- a/decode.c +++ b/decode.c @@ -29,6 +29,8 @@ static GHashTable *pd_meta_visible = NULL; static GHashTable *pd_binary_visible = NULL; static GHashTable *pd_channel_maps = NULL; +uint64_t pd_samplerate = 0; + extern struct srd_session *srd_sess; static int opts_to_gvar(struct srd_decoder *dec, GHashTable *hash, @@ -271,6 +273,11 @@ static void map_pd_inst_channels(void *key, void *value, void *user_data) g_hash_table_iter_init(&iter, channel_map); while (g_hash_table_iter_next(&iter, &channel_id, &channel_target)) { + if (!channel_target) { + g_printerr("cli: Channel name for \"%s\" missing.\n", + (char *)channel_id); + continue; + } ch = find_channel(channel_list, channel_target); if (!ch) { g_printerr("cli: No channel with name \"%s\" found.\n",