mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-07-05 12:15:50 +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,8 +3863,12 @@ Standard_Integer VTexture (Draw_Interpretor& theDi, Standard_Integer theArgsNb,
|
||||
{
|
||||
aTextureVecNew.SetValue (aTexIndex, Handle(Graphic3d_Texture2Dmanual)());
|
||||
}
|
||||
|
||||
if (aTextureVecNew.Value (aTexIndex))
|
||||
{
|
||||
aTextureVecNew.ChangeValue(aTexIndex)->GetParams()->SetTextureUnit((Graphic3d_TextureUnit)aTexIndex);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
std::cout << "Syntax error: invalid argument '" << theArgVec[anArgIter] << "'\n";
|
||||
|
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