Fix in findScatterAndDims to ignore null factors instead of dereferencing them
parent
a7e2a494ed
commit
fe8fc6dd24
|
@ -339,8 +339,10 @@ break;
|
||||||
|
|
||||||
// First do the set union.
|
// First do the set union.
|
||||||
BOOST_FOREACH(const GaussianFactor::shared_ptr& factor, factors) {
|
BOOST_FOREACH(const GaussianFactor::shared_ptr& factor, factors) {
|
||||||
for(GaussianFactor::const_iterator variable = factor->begin(); variable != factor->end(); ++variable) {
|
if(factor) {
|
||||||
scatter.insert(make_pair(*variable, SlotEntry(0, factor->getDim(variable))));
|
for(GaussianFactor::const_iterator variable = factor->begin(); variable != factor->end(); ++variable) {
|
||||||
|
scatter.insert(make_pair(*variable, SlotEntry(0, factor->getDim(variable))));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue