Skip to content

Commit

Permalink
Fix for issue #23
Browse files Browse the repository at this point in the history
  • Loading branch information
walaj committed Feb 16, 2018
1 parent 6285724 commit b0aed4c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions SeqLib/BamReader.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,14 @@ namespace SeqLib {

// close this bam
bool close() {

if (!fp)
return false;

// close the cram reference
if (fp->fp.cram)
cram_close(fp->fp.cram);

fp.reset();
idx.reset();
hts_itr.reset();
Expand Down

0 comments on commit b0aed4c

Please sign in to comment.