csv: Fix a segfault when using non-hardware input.
This commit is contained in:
parent
9e24c8bc65
commit
cf1d5f1749
|
@ -236,7 +236,7 @@ static GString *gen_header(const struct sr_output *o,
|
|||
sr_info("Set sample period to %" PRIu64 " %s",
|
||||
ctx->period, ctx->xlabel);
|
||||
}
|
||||
ctx->title = o->sdi->driver->longname;
|
||||
ctx->title = (o->sdi && o->sdi->driver) ? o->sdi->driver->longname : "unknown";
|
||||
|
||||
/* Some metadata */
|
||||
if (ctx->header && !ctx->did_header) {
|
||||
|
|
Loading…
Reference in New Issue