]> sigrok.org Git - libsigrok.git/blobdiff - output/output_vcd.c
Fix out-of-tree build.
[libsigrok.git] / output / output_vcd.c
index d8ce6ef063e9ad53eb068916d8505c9d5f8d0705..eea2f0e5bcd1997ee21b28f86e8f8a8bfe0d0110 100644 (file)
@@ -61,12 +61,15 @@ static int init(struct output *o)
 
        if (!(ctx = calloc(1, sizeof(struct context))))
                return SIGROK_ERR_MALLOC;
+
        o->internal = ctx;
        ctx->num_enabled_probes = 0;
+
        for (l = o->device->probes; l; l = l->next) {
                probe = l->data;
-               if (probe->enabled)
-                       ctx->probelist[ctx->num_enabled_probes++] = probe->name;
+               if (!probe->enabled)
+                       continue;
+               ctx->probelist[ctx->num_enabled_probes++] = probe->name;
        }
 
        ctx->probelist[ctx->num_enabled_probes] = 0;