Commit 480e1611 authored by Mikaël Salson's avatar Mikaël Salson Committed by Mathieu Giraud
Browse files

algo/core/germline.cpp: Count index reference just once

If we try to set the same index several times we will wrongly have several references to it and, thus,
will never be deleted, which Valgrind dislikes

See !674
parent 8ca5c0db
Pipeline #140906 passed with stages
in 401 minutes and 24 seconds
......@@ -182,8 +182,10 @@ void Germline::new_index(IndexTypes type)
void Germline::set_index(IKmerStore<KmerAffect> *_index)
index = _index;
index->refs++ ;
if (index != _index) {
index = _index;
index->refs++ ;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment