Ensure face being edited/selected actually exists.

This commit is contained in:
Shyotl
2011-05-28 01:49:54 -05:00
parent 799fe056a8
commit 1bc0c5e795

View File

@@ -389,6 +389,11 @@ struct LLPanelFaceSetAlignedTEFunctor : public LLSelectedTEFunctor
return true;
}
if (facep->getViewerObject()->getVolume()->getNumVolumeFaces() <= te)
{
return true;
}
bool set_aligned = true;
if (facep == mCenterFace)
{
@@ -431,6 +436,12 @@ struct LLPanelFaceGetIsAlignedTEFunctor : public LLSelectedTEFunctor
{
return false;
}
if (facep->getViewerObject()->getVolume()->getNumVolumeFaces() <= te)
{ //volume face does not exist, can't be aligned
return false;
}
if (facep == mCenterFace)
{
return true;