Skip to content
Snippets Groups Projects
Commit 398b392d authored by David Parks's avatar David Parks
Browse files

SH-391 Do some bounds checking on texture entry indices when aligning planar faces.

parent 7738548a
No related branches found
No related tags found
No related merge requests found
...@@ -376,6 +376,11 @@ struct LLPanelFaceSetAlignedTEFunctor : public LLSelectedTEFunctor ...@@ -376,6 +376,11 @@ struct LLPanelFaceSetAlignedTEFunctor : public LLSelectedTEFunctor
return true; return true;
} }
if (facep->getViewerObject()->getVolume()->getNumVolumeFaces() <= te)
{
return true;
}
bool set_aligned = true; bool set_aligned = true;
if (facep == mCenterFace) if (facep == mCenterFace)
{ {
...@@ -418,6 +423,12 @@ struct LLPanelFaceGetIsAlignedTEFunctor : public LLSelectedTEFunctor ...@@ -418,6 +423,12 @@ struct LLPanelFaceGetIsAlignedTEFunctor : public LLSelectedTEFunctor
{ {
return false; return false;
} }
if (facep->getViewerObject()->getVolume()->getNumVolumeFaces() <= te)
{ //volume face does not exist, can't be aligned
return false;
}
if (facep == mCenterFace) if (facep == mCenterFace)
{ {
return true; return true;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment