]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Avoid crash with null shape for presentation
authorvsv <vitaly.smetannikov@opencascade.com>
Mon, 29 Dec 2014 15:38:40 +0000 (18:38 +0300)
committervsv <vitaly.smetannikov@opencascade.com>
Mon, 29 Dec 2014 15:38:40 +0000 (18:38 +0300)
src/ModuleBase/ModuleBase_ResultPrs.cpp

index 5031dac249edaa366522b15c03060c7eac8b0ffa..3e24e1e767126bee62b7a0435315f64795c76024 100644 (file)
@@ -51,8 +51,10 @@ void ModuleBase_ResultPrs::Compute(const Handle(PrsMgr_PresentationManager3d)& t
   if (!aShapePtr)
     return;
   myOriginalShape = aShapePtr->impl<TopoDS_Shape>();
-  Set(aShapePtr->impl<TopoDS_Shape>());
-  AIS_Shape::Compute(thePresentationManager, thePresentation, theMode);
+  if (!myOriginalShape.IsNull()) {
+    Set(aShapePtr->impl<TopoDS_Shape>());
+    AIS_Shape::Compute(thePresentationManager, thePresentation, theMode);
+  }
 }