Added assertions to check for valid pointer values
parent
936081a05d
commit
a004354c20
|
@ -155,6 +155,8 @@ typename EliminationTree<FACTOR>::shared_ptr EliminationTree<FACTOR>::Create(
|
|||
if(debug)
|
||||
trees.back()->print("ETree: ");
|
||||
|
||||
// Check that this is not null
|
||||
assert(trees.back().get());
|
||||
return trees.back();
|
||||
}
|
||||
|
||||
|
|
|
@ -34,9 +34,11 @@ namespace gtsam {
|
|||
gttic(JT_symbolic_ET);
|
||||
const typename EliminationTree<IndexFactor>::shared_ptr symETree =
|
||||
EliminationTree<IndexFactor>::Create(fg, variableIndex);
|
||||
assert(symETree.get());
|
||||
gttoc(JT_symbolic_ET);
|
||||
gttic(JT_symbolic_eliminate);
|
||||
SymbolicBayesNet::shared_ptr sbn = symETree->eliminate(&EliminateSymbolic);
|
||||
assert(sbn.get());
|
||||
gttoc(JT_symbolic_eliminate);
|
||||
gttic(symbolic_BayesTree);
|
||||
SymbolicBayesTree sbt(*sbn);
|
||||
|
|
Loading…
Reference in New Issue