From: Petr Danecek Date: Tue, 12 Mar 2013 13:06:52 +0000 (+0000) Subject: bcftools view: Exit with an error if the -l file cannot be read X-Git-Url: https://git.donarmstrong.com/?p=samtools.git;a=commitdiff_plain;h=dacaaf518ea98ea7daf939c64f76f1938b936967 bcftools view: Exit with an error if the -l file cannot be read --- diff --git a/bcftools/call1.c b/bcftools/call1.c index 5f32c34..bc1cd40 100644 --- a/bcftools/call1.c +++ b/bcftools/call1.c @@ -319,7 +319,7 @@ int bcfview(int argc, char *argv[]) while ((c = getopt(argc, argv, "FN1:l:cC:eHAGvbSuP:t:p:QgLi:IMs:D:U:X:d:T:Ywm:K:")) >= 0) { switch (c) { case '1': vc.n1 = atoi(optarg); break; - case 'l': vc.bed = bed_read(optarg); break; + case 'l': vc.bed = bed_read(optarg); if (!vc.bed) fprintf(stderr,"Could not read \"%s\"\n", optarg); return 1; break; case 'D': vc.fn_dict = strdup(optarg); break; case 'F': vc.flag |= VC_FIX_PL; break; case 'N': vc.flag |= VC_ACGT_ONLY; break;