diff --git a/src/main/java/htsjdk/samtools/SAMRecord.java b/src/main/java/htsjdk/samtools/SAMRecord.java index d08a16e5fe..787b9d0485 100644 --- a/src/main/java/htsjdk/samtools/SAMRecord.java +++ b/src/main/java/htsjdk/samtools/SAMRecord.java @@ -338,6 +338,7 @@ private boolean hasReferenceName() { */ public boolean isPair(final SAMRecord record) { return record != null + && this.getReadName().equals(record.getReferenceName()) && this.getMateAlignmentStart() == record.getAlignmentStart() && record.getMateAlignmentStart() == this.getAlignmentStart() && !NO_ALIGNMENT_REFERENCE_NAME.equals(this.getMateReferenceName())