Browse code

woops, fix seg-fault when read length not passed to bam_tally

git-svn-id: file:///home/git/hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/gmapR@86189 bc3139a8-67e5-0310-9ffc-ced21a209358

Michael Lawrence authored on 07/02/2014 01:10:55
Showing 1 changed files

... ...
@@ -492,6 +492,8 @@ SEXP R_tally_iit_parse(SEXP tally_iit_R, SEXP cycle_breaks_R,
492 492
   param.read_length = asInteger(read_length_R);
493 493
   if (param.read_length != NA_INTEGER) {
494 494
     param.mdfne_buf = (double *)R_alloc(sizeof(double), param.read_length);
495
+  } else {
496
+    param.mdfne_buf = NULL;
495 497
   }
496 498
   
497 499
   if (which_R == R_NilValue) {