X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FModuleBase%2FModuleBase_ResultPrs.cpp;h=6de0bba8fc0d5037959669ea11288756b16420f4;hb=6538b6539abf93cf24183c7cfe8a5800a464178f;hp=c8eea52c22e4155eaab79d4322e32f145c23351d;hpb=7c2fdd36b2bc385c4316a3b2d661c9f9ecf032f6;p=modules%2Fshaper.git diff --git a/src/ModuleBase/ModuleBase_ResultPrs.cpp b/src/ModuleBase/ModuleBase_ResultPrs.cpp index c8eea52c2..6de0bba8f 100644 --- a/src/ModuleBase/ModuleBase_ResultPrs.cpp +++ b/src/ModuleBase/ModuleBase_ResultPrs.cpp @@ -5,7 +5,7 @@ #include "ModuleBase_ResultPrs.h" #include -#include +#include #include #include @@ -20,8 +20,8 @@ ModuleBase_ResultPrs::ModuleBase_ResultPrs(ResultPtr theResult) : AIS_Shape(TopoDS_Shape()), myResult(theResult), myIsSketchMode(false) { boost::shared_ptr aShapePtr = ModelAPI_Tools::shape(theResult); - boost::shared_ptr aWirePtr = - boost::dynamic_pointer_cast(aShapePtr); + boost::shared_ptr aWirePtr = + boost::dynamic_pointer_cast(aShapePtr); if (aWirePtr) { if (aWirePtr->hasPlane() ) { // If this is a wire with plane defined thin it is a sketch-like object @@ -46,6 +46,8 @@ void ModuleBase_ResultPrs::Compute(const Handle(PrsMgr_PresentationManager3d)& t const Standard_Integer theMode) { boost::shared_ptr aShapePtr = ModelAPI_Tools::shape(myResult); + if (!aShapePtr) + return; myOriginalShape = aShapePtr->impl(); Set(aShapePtr->impl()); AIS_Shape::Compute(thePresentationManager, thePresentation, theMode);