Fixed a bug where we could ask for a read when there were none in the pool (that's a bad thing).

git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@605 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
aaron 2009-05-06 18:40:55 +00:00
parent ef211f96b1
commit f5eae98af2
1 changed files with 4 additions and 0 deletions

View File

@ -150,7 +150,11 @@ public class MergingSamRecordIterator2 implements CloseableIterator<SAMRecord>,
if (!initialized) {
lazyInitialization();
}
final ComparableSamRecordIterator iterator = this.pq.poll();
if (iterator == null) {
return null;
}
final SAMRecord record = iterator.next();
addIfNotEmpty(iterator);