Fixed iSAM2 bug where assignment operator and copy constructor may cause null pointer exception when trying to clone cached linear factors, which become null by calling marginalizeLeaves with linear factor caching enabled.

release/4.3a0
Richard Roberts 2013-06-04 17:34:03 +00:00
parent b2d4469cb3
commit 84903d05c2
1 changed files with 1 additions and 1 deletions

View File

@ -125,7 +125,7 @@ ISAM2& ISAM2::operator=(const ISAM2& rhs) {
linearFactors_ = GaussianFactorGraph();
linearFactors_.reserve(rhs.linearFactors_.size());
BOOST_FOREACH(const GaussianFactor::shared_ptr& linearFactor, rhs.linearFactors_) {
linearFactors_.push_back(linearFactor->clone()); }
linearFactors_.push_back(linearFactor ? linearFactor->clone() : GaussianFactor::shared_ptr()); }
ordering_ = rhs.ordering_;
params_ = rhs.params_;