]> git.donarmstrong.com Git - samtools.git/blobdiff - bam_import.c
* samtools-0.1.4-16 (r360)
[samtools.git] / bam_import.c
index c7f866701edd87f37e18fbc9768ed63f68be7f9e..fccaa022208131b27093a2b44f32e74d13a469c0 100644 (file)
@@ -154,6 +154,7 @@ int sam_header_parse_rg(bam_header_t *h)
        int n = 0;
 
        // free
+       if (h == 0) return 0;
        bam_strmap_destroy(h->rg2lib); h->rg2lib = 0;
        if (h->l_text < 3) return 0;
        // parse @RG lines