]> SALOME platform Git repositories - modules/geom.git/commitdiff
Salome HOME
4x & 5x: Error at Measures - Dimensions - Angle with edge selection
authordmv <dmv@opencascade.com>
Wed, 15 Oct 2008 13:47:10 +0000 (13:47 +0000)
committerdmv <dmv@opencascade.com>
Wed, 15 Oct 2008 13:47:10 +0000 (13:47 +0000)
src/GEOMImpl/GEOMImpl_IMeasureOperations.cxx

index fc5042bc07fb1bed997b19846e4a1916972db9bc..e9d5815bec9e4ada73f9479f25ac145007438604 100644 (file)
@@ -1767,7 +1767,8 @@ Standard_Real GEOMImpl_IMeasureOperations::GetAngle (Handle(GEOM_Object) theLine
     Handle(Geom_Curve) C1 = BRep_Tool::Curve(E1,fp,lp);
     Handle(Geom_Curve) C2 = BRep_Tool::Curve(E2,fp,lp);
 
-    if (!C1->IsKind(STANDARD_TYPE(Geom_Line)) ||
+    if ( C1.IsNull() || C2.IsNull() ||
+       !C1->IsKind(STANDARD_TYPE(Geom_Line)) ||
         !C2->IsKind(STANDARD_TYPE(Geom_Line)))
     {
       SetErrorCode("The edges must be linear");