Fixed synchronization code in ConcurrentBatchFilter such that an empty graph does not trigger a segfault

release/4.3a0
Stephen Williams 2013-05-01 20:54:53 +00:00
parent 444ab957c4
commit 36e66b2f0b
1 changed files with 71 additions and 70 deletions

View File

@ -124,6 +124,7 @@ void ConcurrentBatchFilter::synchronize(const NonlinearFactorGraph& summarizedFa
values.insert(smootherValues_);
values.update(separatorValues); // ensure the smoother summarized factors are linearized around the values in the smoother
if(factors_.size() > 0) {
// Perform an optional optimization on the to-be-sent-to-the-smoother factors
if(true) {
// Create ordering and delta
@ -201,7 +202,7 @@ void ConcurrentBatchFilter::synchronize(const NonlinearFactorGraph& summarizedFa
// all of the smoother variables that are not part of the new separator. This smoother summarization will be
// stored locally for use in the filter
smootherSummarizationSlots_ = insertFactors( marginalize(graph, values, smootherOrdering, smootherKeys, parameters_.getEliminationFunction()) );
}
gttoc(synchronize);
}