X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=bam_tview.c;h=be2579ca0ee28f59792e863bd102b2f7937566d0;hb=8cab5e6afd245a6dbbb1580dc37cd3ee36e55078;hp=e5b83a11c17e6ce393e119945cf43e048ad07e8a;hpb=01ddec3d623b07bfe54d7c31913da79db92b4dbf;p=samtools.git diff --git a/bam_tview.c b/bam_tview.c index e5b83a1..be2579c 100644 --- a/bam_tview.c +++ b/bam_tview.c @@ -161,6 +161,7 @@ tview_t *tv_init(const char *fn, const char *fn_fa) tview_t *tv = (tview_t*)calloc(1, sizeof(tview_t)); tv->is_dot = 1; tv->idx = bam_index_load(fn); + if (tv->idx == 0) exit(1); tv->fp = bam_open(fn, "r"); bgzf_set_cache_size(tv->fp, 8 * 1024 *1024); assert(tv->fp);