gnuplot: proper error message when using gnuplot output without logic probe

This commit is contained in:
Aurelien Jacobs 2014-01-14 22:59:33 +01:00
parent ad7621d445
commit 365cca8aca
1 changed files with 5 additions and 0 deletions

View File

@ -86,6 +86,11 @@ static int init(struct sr_output *o)
continue;
ctx->num_enabled_probes++;
}
if (ctx->num_enabled_probes <= 0) {
sr_err("%s: no logic probe enabled", __func__);
return SR_ERR;
}
ctx->unitsize = (ctx->num_enabled_probes + 7) / 8;
num_probes = g_slist_length(o->sdi->probes);