diff --git a/hisat_3n_table.cpp b/hisat_3n_table.cpp index f639677..a537228 100644 --- a/hisat_3n_table.cpp +++ b/hisat_3n_table.cpp @@ -287,7 +287,8 @@ int hisat_3n_table() } // if the samChromosome is different than current positions' chromosome, finish all SAM line. // then load a new reference chromosome. - if (samChromosome != *positions->chromosome) { + auto old = positions->chromosome; + if (samChromosome != (old ? *old : "")) { positions->appendingFinished(); positions->moveAllToOutput(); positions->loadNewChromosome(std::move(samChromosome));