Verified Commit 0e956de0 authored by Gabriele Buondonno's avatar Gabriele Buondonno Committed by Justin Carpentier
Browse files

[multibody] [getFrameId] Fix assert

parent 939e76cc
......@@ -233,8 +233,8 @@ namespace pinocchio
= std::find_if(frames.begin()
,frames.end()
,details::FilterFrame(name, type));
assert(it != frames.end() && "Frame not found");
assert((std::find_if( boost::next(it), frames.end(), details::FilterFrame(name, type)) == frames.end())
assert(((it == frames.end()) ||
(std::find_if( boost::next(it), frames.end(), details::FilterFrame(name, type)) == frames.end()))
&& "Several frames match the filter");
return FrameIndex(it - frames.begin());
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment