Only check if other shape is the same if inliers not empty

This commit is contained in:
Simon Giraudot 2017-01-11 11:35:05 +01:00
parent 0ce39504c8
commit 94b0157563
1 changed files with 6 additions and 5 deletions

View File

@ -597,6 +597,7 @@ shape. The implementation follows \cgalCite{schnabel2007efficient}.
if (best_candidate->indices_of_assigned_points().size() <
m_options.min_points)
{
if (!(best_candidate->indices_of_assigned_points().empty()))
for (std::size_t i = 0;i < candidates.size() - 1;i++) {
if (best_candidate->is_same(candidates[i])) {
delete candidates[i];