Fix long-standing NPE in LMS due to inappropriate timing of initialization

This commit is contained in:
Mark DePristo 2012-09-04 18:02:40 -04:00
parent a997c99806
commit c822b7c760
1 changed files with 2 additions and 1 deletions

View File

@ -60,11 +60,12 @@ public class LinearMicroScheduler extends MicroScheduler {
boolean done = walker.isDone();
int counter = 0;
traversalEngine.startTimersIfNecessary();
for (Shard shard : shardStrategy ) {
if ( done || shard == null ) // we ran out of shards that aren't owned
break;
traversalEngine.startTimersIfNecessary();
if(shard.getShardType() == Shard.ShardType.LOCUS) {
WindowMaker windowMaker = new WindowMaker(shard, engine.getGenomeLocParser(),
getReadIterator(shard), shard.getGenomeLocs(), SampleUtils.getSAMFileSamples(engine));