Skip to content

Commit 9e81e92

Browse files
committed
Do not segfault when only INFO fields are queried with -t q. Fixes samtools#982
1 parent 31c9309 commit 9e81e92

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

plugins/setGT.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,7 @@ bcf1_t *process(bcf1_t *rec)
391391

392392
for (i=0; i<rec->n_sample; i++)
393393
{
394-
if ( !args->smpl_pass[i] ) continue;
394+
if ( args->smpl_pass && !args->smpl_pass[i] ) continue;
395395
if ( args->new_mask&GT_UNPHASED )
396396
changed += unphase_gt(args->gts + i*ngts, ngts);
397397
else if ( args->new_mask==GT_PHASED )

0 commit comments

Comments
 (0)