Missing null check added
Add test case bugs/vis/bug29651
{
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
{
--- /dev/null
+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