mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-21 10:13:43 +03:00
0029651: ViewerTest - vtexture command crashes
Missing null check added Add test case bugs/vis/bug29651
This commit is contained in:
parent
e13b9464ef
commit
7373e19fa1
@ -3863,7 +3863,11 @@ Standard_Integer VTexture (Draw_Interpretor& theDi, Standard_Integer theArgsNb,
|
|||||||
{
|
{
|
||||||
aTextureVecNew.SetValue (aTexIndex, Handle(Graphic3d_Texture2Dmanual)());
|
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
|
else
|
||||||
{
|
{
|
||||||
|
17
tests/bugs/vis/bug29651
Normal file
17
tests/bugs/vis/bug29651
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
puts "========"
|
||||||
|
puts "OCC29651"
|
||||||
|
puts "========"
|
||||||
|
puts ""
|
||||||
|
##########################################
|
||||||
|
# ViewerTest - vtexture command crashes
|
||||||
|
##########################################
|
||||||
|
|
||||||
|
vinit
|
||||||
|
vsetdispmode 1
|
||||||
|
box b 1 2 3
|
||||||
|
vdisplay b
|
||||||
|
vfit
|
||||||
|
vtexture b 0
|
||||||
|
vtexture b off
|
||||||
|
|
||||||
|
checkview -screenshot -3d -path ${imagedir}/${test_image}.png
|
Loading…
x
Reference in New Issue
Block a user