0022761: Exception in ModelingData in debug mode
authorDBV <>
Fri, 21 Oct 2011 17:31:28 +0000 (17:31 +0000)
committerbugmaster <bugmaster@opencascade.com>
Mon, 5 Mar 2012 15:30:51 +0000 (19:30 +0400)
src/BRepTools/BRepTools.cxx

index f77dea8..0a73164 100755 (executable)
@@ -143,11 +143,11 @@ void  BRepTools::AddUVBounds(const TopoDS_Face& F,
   Standard_Real pf,pl;
   Bnd_Box2d Baux; 
   const Handle(Geom2d_Curve) C = BRep_Tool::CurveOnSurface(E,F,pf,pl);
+  if (C.IsNull()) return;
   if (pl < pf) { // Petit Blindage
     Standard_Real aux;
     aux = pf; pf = pl; pl = aux;
   }
-  if (C.IsNull()) return;
   Geom2dAdaptor_Curve PC(C,pf,pl);
   if (Precision::IsNegativeInfinite(pf) ||
       Precision::IsPositiveInfinite(pf)) {