Commit da445b01 authored by Jan Möbius's avatar Jan Möbius

Check if no faces are available for picking in mesh node

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@5459 383ad7c9-94d9-4d36-a494-682f7c89f535
parent e3b17914
......@@ -1234,12 +1234,19 @@ pick_faces(GLState& _state)
typename Mesh::ConstFaceVertexIter fv_it;
if (!_state.pick_set_maximum (mesh_.n_faces()))
{
omerr() << "MeshNode::pick_faces: color range too small, "
<< "picking failed\n";
return;
}
if ( mesh_.n_faces() > 0 )
if (!_state.pick_set_maximum (mesh_.n_faces()))
{
omerr() << "MeshNode::pick_faces: color range too small, "
<< "picking failed\n";
return;
}
else
if (!_state.pick_set_maximum (1))
{
omerr() << "Strange pickSetMAximum failed for index 1 in MeshNode\n";
return;
}
if (faceList_ && !updateFaceList_ && _state.pick_current_index () == faceBaseIndex_)
{
......
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