Skip to content

Commit d4641e9

Browse files
committed
fix crashing due to null pointers
1 parent e4f9113 commit d4641e9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tree/tree.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9602,7 +9602,7 @@ void cmaple::Tree::calSiteLhDiffNonRoot(
96029602

96039603
// now switch to use the same local ref as the tmp parent node
96049604
// de-integrate mutations at the tmp current node, if any
9605-
if (tmp_node_mutations && tmp_node_mutations->size())
9605+
if (new_lower_lh && tmp_node_mutations && tmp_node_mutations->size())
96069606
{
96079607
bk_new_lower_lh = bk_new_lower_lh
96089608
->integrateMutations<num_states>(tmp_node_mutations, aln, true);
@@ -10748,7 +10748,7 @@ bool cmaple::Tree::calculateNNILhNonRoot(
1074810748

1074910749
// now switch to use the same local ref as the tmp parent node
1075010750
// de-integrate mutations at the tmp current node, if any
10751-
if (tmp_node_mutations && tmp_node_mutations->size())
10751+
if (new_lower_lh && tmp_node_mutations && tmp_node_mutations->size())
1075210752
{
1075310753
new_lower_lh = new_lower_lh
1075410754
->integrateMutations<num_states>(tmp_node_mutations, aln, true);

0 commit comments

Comments
 (0)