Fix segfault when showZero==false
parent
dcc74d827d
commit
541127f855
|
|
@ -262,8 +262,7 @@ namespace gtsam {
|
||||||
// Check if zero
|
// Check if zero
|
||||||
if (!showZero) {
|
if (!showZero) {
|
||||||
const Leaf* leaf = dynamic_cast<const Leaf*>(branch.get());
|
const Leaf* leaf = dynamic_cast<const Leaf*>(branch.get());
|
||||||
std::string value = valueFormatter(leaf->constant());
|
if (leaf && valueFormatter(leaf->constant()).compare("0")) continue;
|
||||||
if (leaf && value.compare("0")) continue;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
os << "\"" << this->id() << "\" -> \"" << branch->id() << "\"";
|
os << "\"" << this->id() << "\" -> \"" << branch->id() << "\"";
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue