X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Finput%2Fvcd.c;h=4e0310bac67e4e55f7e56f6a124812d13dbfb3aa;hb=2cb4204c6f31b58a4713ce39b77d37b95f0b20f5;hp=fb25f10aae0a9c667378e973ffc82b0128f2c064;hpb=ec30291701bb1dcb6755a97ae6c18146fe9ad020;p=libsigrok.git diff --git a/src/input/vcd.c b/src/input/vcd.c index fb25f10a..4e0310ba 100644 --- a/src/input/vcd.c +++ b/src/input/vcd.c @@ -1096,9 +1096,11 @@ static void create_feeds(const struct sr_input *in) inc = in->priv; /* Create one feed for logic data. */ - inc->unit_size = (inc->logic_count + 7) / 8; - inc->feed_logic = feed_queue_logic_alloc(in->sdi, - CHUNK_SIZE / inc->unit_size, inc->unit_size); + if (inc->logic_count) { + inc->unit_size = (inc->logic_count + 7) / 8; + inc->feed_logic = feed_queue_logic_alloc(in->sdi, + CHUNK_SIZE / inc->unit_size, inc->unit_size); + } /* Create one feed per analog channel. */ for (l = inc->channels; l; l = l->next) {