0027916: Visualization - access violation occurs within AIS_ColoredShape::Compute...
[occt.git] / src / AIS / AIS_ColoredShape.cxx
index e8f20dd..d092581 100644 (file)
@@ -299,7 +299,11 @@ void AIS_ColoredShape::Compute (const Handle(PrsMgr_PresentationManager3d)& ,
                                 const Handle(Prs3d_Presentation)&           thePrs,
                                 const Standard_Integer                      theMode)
 {
-  thePrs->Clear();
+  if (myshape.IsNull())
+  {
+    return;
+  }
+
   if (IsInfinite())
   {
     thePrs->SetInfiniteState (Standard_True);