X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FModuleBase%2FModuleBase_ResultPrs.cpp;h=6de0bba8fc0d5037959669ea11288756b16420f4;hb=3c5cc0cd68b845cee1d58e61974ae0013b50199c;hp=c8eea52c22e4155eaab79d4322e32f145c23351d;hpb=e0dddd8c3be7d84a4a195eb02a22f9733da7ed5e;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);