bcftools.1 and samtools.1 were merged in upstream release 0.1.17.
[samtools.git] / sample.c
index 3efc559dfda52ff5b8a706feb4036a79a7d1c6f8..4e4b8a455ed445bd9676ed7e1ffe4abbe8f52048 100644 (file)
--- a/sample.c
+++ b/sample.c
@@ -55,6 +55,10 @@ int bam_smpl_add(bam_sample_t *sm, const char *fn, const char *txt)
        kstring_t buf;
        int n = 0;
        khash_t(sm) *sm2id = (khash_t(sm)*)sm->sm2id;
+       if (txt == 0) {
+               add_pair(sm, sm2id, fn, fn);
+               return 0;
+       }
        memset(&buf, 0, sizeof(kstring_t));
        while ((q = strstr(p, "@RG")) != 0) {
                p = q + 3;