0029729: Visualization, Graphic3d_ClipPlane - add support of clipping plane chains
[occt.git] / src / ViewerTest / ViewerTest.cxx
index 6f53cd3..b04a299 100644 (file)
@@ -2626,8 +2626,13 @@ static Standard_Integer VAspects (Draw_Interpretor& /*theDI*/,
 
   for (ViewTest_PrsIter aPrsIter (aNames); aPrsIter.More(); aPrsIter.Next())
   {
-    const TCollection_AsciiString& aName   = aPrsIter.CurrentName();
-    Handle(AIS_InteractiveObject)  aPrs    = aPrsIter.Current();
+    const TCollection_AsciiString& aName = aPrsIter.CurrentName();
+    Handle(AIS_InteractiveObject)  aPrs  = aPrsIter.Current();
+    if (aPrs.IsNull())
+    {
+      return 1;
+    }
+
     Handle(Prs3d_Drawer)           aDrawer = aPrs->Attributes();
     Handle(AIS_ColoredShape) aColoredPrs;
     Standard_Boolean toDisplay = Standard_False;