diff --git a/src/mutation_annotated_tree.cpp b/src/mutation_annotated_tree.cpp index f7ead578..ffdd0bc9 100644 --- a/src/mutation_annotated_tree.cpp +++ b/src/mutation_annotated_tree.cpp @@ -393,7 +393,7 @@ Mutation_Annotated_Tree::Tree Mutation_Annotated_Tree::create_tree_from_newick_s } T.curr_internal_node = 0; - std::stack parent_stack; + std::stack parent_stack; for (size_t i=0; i mis std::string new_node_name = "node_" + std::to_string(1+condensed_nodes.size()) + "_condensed_" + std::to_string(polytomy_nodes.size()) + "_leaves"; auto curr_node = get_node(l1->identifier); - auto new_node = create_node(new_node_name, curr_node->parent->identifier, l1->branch_length); + auto new_node = create_node(new_node_name, curr_node->parent, l1->branch_length); new_node->clear_mutations(); @@ -953,7 +954,7 @@ void Mutation_Annotated_Tree::Tree::uncondense_leaves() { } for (size_t s = 1; s < num_samples; s++) { - create_node(cn->second[s], par->identifier, n->branch_length); + create_node(cn->second[s], par, n->branch_length); } } condensed_nodes.clear();