Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/bam_filt.c
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,10 @@ int parse_target_list(bam_hdr_t *header){
if(header->n_targets == 0) {
fprintf(stderr, "WARNING : no sequences in bam header : in : %s\n", __func__);
}

// strtok will cause a seg fault if you giv it a NULL at least for Unbuntu
if(bamfilt_global_opts.exclude_str == NULL) return 0;

char * pch = strtok (bamfilt_global_opts.exclude_str,",");
uint32_t nseq = 0;
while (pch != NULL)
Expand Down