1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-09 13:22:24 +03:00

0029651: ViewerTest - vtexture command crashes

Missing null check added

Add test case bugs/vis/bug29651
This commit is contained in:
san
2018-03-27 11:54:12 +03:00
committed by bugmaster
parent e13b9464ef
commit 7373e19fa1
2 changed files with 22 additions and 1 deletions

View File

@@ -3863,7 +3863,11 @@ Standard_Integer VTexture (Draw_Interpretor& theDi, Standard_Integer theArgsNb,
{
aTextureVecNew.SetValue (aTexIndex, Handle(Graphic3d_Texture2Dmanual)());
}
aTextureVecNew.ChangeValue (aTexIndex)->GetParams()->SetTextureUnit ((Graphic3d_TextureUnit )aTexIndex);
if (aTextureVecNew.Value (aTexIndex))
{
aTextureVecNew.ChangeValue(aTexIndex)->GetParams()->SetTextureUnit((Graphic3d_TextureUnit)aTexIndex);
}
}
else
{