]> git.donarmstrong.com Git - samtools.git/blobdiff - bam_index.c
* BUGGY VERSION
[samtools.git] / bam_index.c
index 4606d6b1107f1c901d5961be1309e0c87e69d674..a6278843583c605799360affb0b9c3c21fbd02c4 100644 (file)
@@ -542,6 +542,7 @@ int bam_fetch(bamFile fp, const bam_index_t *idx, int tid, int beg, int end, voi
 {
        int n_off;
        pair64_t *off = get_chunk_coordinates(idx, tid, beg, end, &n_off);
+       if (off == 0) return 0;
        {
                // retrive alignments
                uint64_t curr_off;