]> sigrok.org Git - libsigrok.git/blobdiff - src/session_driver.c
Enable loading of session files without the capture file defined
[libsigrok.git] / src / session_driver.c
index 07ee10b04aee08d974daa55b62444df373e219ab..0793104b0ccc63683c5120a5279fbb1a7fa4ead7 100644 (file)
@@ -74,10 +74,11 @@ static gboolean stream_session_data(struct sr_dev_inst *sdi)
 
        got_data = FALSE;
        vdev = sdi->priv;
+
        if (!vdev->capfile) {
                /* No capture file opened yet, or finished with the last
                 * chunked one. */
-               if (vdev->cur_chunk == 0) {
+               if (vdev->capturefile && (vdev->cur_chunk == 0)) {
                        /* capturefile is always the unchunked base name. */
                        if (zip_stat(vdev->archive, vdev->capturefile, 0, &zs) != -1) {
                                /* No chunks, just a single capture file. */