Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions simulator/alisimulator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -166,10 +166,15 @@ void AliSimulator::initializeIQTreeFromTreeFile()

// set the new PhyloTreeMixlen to the new tree
current_tree = new_tree;


// update the pointer stored in the super tree's vector of partition
// trees; otherwise it keeps referencing the just-deleted old tree,
// causing a dangling-pointer crash later (e.g. in initSequences())
((PhyloSuperTree*) tree)->at(i) = current_tree;

// re-load the tree/branch-lengths from the file
current_tree->IQTree::readTree(params->user_file, is_rooted, tree_line_index);

// re-initialize the model
initializeModel(current_tree, current_tree->aln->model_name);
}
Expand Down
Loading