Fixed memory issue (passing temporary to optional reference)

release/4.3a0
Frank Dellaert 2019-04-03 22:45:49 -04:00
parent 5a8363a775
commit 3126979ad5
1 changed files with 2 additions and 1 deletions

View File

@ -163,7 +163,8 @@ namespace gtsam {
return factorGraph.jacobian(ordering);
} else {
// recursively call with default ordering
return matrix(this->ordering());
const auto defaultOrdering = this->ordering();
return matrix(defaultOrdering);
}
}