]> git.donarmstrong.com Git - samtools.git/blobdiff - bamtk.c
* samtools-0.1.2-10
[samtools.git] / bamtk.c
diff --git a/bamtk.c b/bamtk.c
index 9521fdd2445e01e325fc6aa494e19a340380f377..9ebaac6b4ccff5582f4c77a746265b036b9026b6 100644 (file)
--- a/bamtk.c
+++ b/bamtk.c
@@ -3,7 +3,7 @@
 #include "bam.h"
 
 #ifndef PACKAGE_VERSION
-#define PACKAGE_VERSION "0.1.2-8"
+#define PACKAGE_VERSION "0.1.2-10"
 #endif
 
 int bam_taf2baf(int argc, char *argv[]);
@@ -65,6 +65,7 @@ int bam_view(int argc, char *argv[])
                for (i = optind + 1; i < argc; ++i) {
                        int tid, beg, end;
                        bam_parse_region(header, argv[i], &tid, &beg, &end);
+                       if (tid < 0) return 0;
                        if (is_bam) bam_fetch(fp, idx, tid, beg, end, fpout, view_auxb);
                        else bam_fetch(fp, idx, tid, beg, end, header, view_aux);
                }