From: vsr Date: Sat, 29 Dec 2012 11:23:25 +0000 (+0000) Subject: 0022051: [CEA 744] SALOME crashes when calliing "BasicProperties" on a sphere degener... X-Git-Tag: V6_main_FINAL~67 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=6e9295ce4cee26be461fd79686d9ad4749f6f21b;p=modules%2Fgeom.git 0022051: [CEA 744] SALOME crashes when calliing "BasicProperties" on a sphere degenerated edge --- diff --git a/src/GEOMBase/GEOMBase.cxx b/src/GEOMBase/GEOMBase.cxx index 1df7a528c..0e13b280e 100644 --- a/src/GEOMBase/GEOMBase.cxx +++ b/src/GEOMBase/GEOMBase.cxx @@ -512,7 +512,7 @@ TopoDS_Shape GEOMBase::CreateArrowForLinearEdge( const TopoDS_Shape& shape ) try { Standard_Real first, last; Handle(Geom_Curve) curv = BRep_Tool::Curve( TopoDS::Edge( shape ), first, last ); - if ( curv->IsCN(1) ) { + if ( !curv.IsNull() && curv->IsCN(1) ) { const Standard_Real param = ( first+last ) / 2.0; gp_Pnt middleParamPoint; gp_Vec V1;