From 44fb70f22ed11a3406df8b8b9b05e6357f66da23 Mon Sep 17 00:00:00 2001 From: MSV <> Date: Thu, 28 Apr 2011 15:33:33 +0000 Subject: [PATCH] OCC22400 BndLib_Add3dCurve::Add - protect against void bounding box --- src/BndLib/BndLib_Add3dCurve.cxx | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/BndLib/BndLib_Add3dCurve.cxx b/src/BndLib/BndLib_Add3dCurve.cxx index a00ee78f73..271e7783f1 100755 --- a/src/BndLib/BndLib_Add3dCurve.cxx +++ b/src/BndLib/BndLib_Add3dCurve.cxx @@ -150,11 +150,14 @@ void BndLib_Add3dCurve::Add( const Adaptor3d_Curve& C, tol = Max(FillBox(B1,GACurve,first,last,N), tol); first = last; } - B1.Enlarge(weakness*tol); - Standard_Real x, y, z, X, Y, Z; - B1.Get(x, y, z, X, Y, Z); - B.Update(x, y, z, X, Y, Z); - B.Enlarge(Tol); + if (!B1.IsVoid()) + { + B1.Enlarge(weakness*tol); + Standard_Real x, y, z, X, Y, Z; + B1.Get(x, y, z, X, Y, Z); + B.Update(x, y, z, X, Y, Z); + B.Enlarge(Tol); + } //<-OCC566(apo) break; }