Fix saving to session file.
authorBert Vermeulen <bert@biot.com>
Thu, 24 Apr 2014 18:58:35 +0000 (20:58 +0200)
committerBert Vermeulen <bert@biot.com>
Thu, 24 Apr 2014 18:58:35 +0000 (20:58 +0200)
session.c

index 7b2aaf4a304dbb611ded1c26304ad7a2b58c08c2..598ef003dfb9a39c2e0de0d257553f562f0d3fd7 100644 (file)
--- a/session.c
+++ b/session.c
@@ -300,7 +300,7 @@ void datafeed_in(const struct sr_dev_inst *sdi,
                break;
        }
 
-       if (o && !opt_pds) {
+       if (o && outfile && !opt_pds) {
                if (sr_output_send(o, packet, &out) == SR_OK && out) {
                        fwrite(out->str, 1, out->len, outfile);
                        fflush(outfile);