From 3b485f4d87f9d629deb5be151dbc32c5055f6ab3 Mon Sep 17 00:00:00 2001 From: gdd Date: Thu, 9 Aug 2012 14:30:34 +0000 Subject: [PATCH] Check if aUnitName is NULL before testing unit value. --- src/IGESImport/IGESImport.cxx | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/src/IGESImport/IGESImport.cxx b/src/IGESImport/IGESImport.cxx index cff70de18..43f0e3870 100644 --- a/src/IGESImport/IGESImport.cxx +++ b/src/IGESImport/IGESImport.cxx @@ -101,14 +101,18 @@ IGESIMPORT_EXPORT if (!aModel.IsNull()) { Handle(TCollection_HAsciiString) aUnitName = aModel->GlobalSection().UnitName(); - //cout<<"aUnitName = "<ToCString()<String()=="CM") { - P = gp_Pnt(0.01,0.0,0.0); + if (!aUnitName.IsNull()) { + //cout<<"aUnitName = "<ToCString()<String()=="CM") { + P = gp_Pnt(0.01,0.0,0.0); + } } + //else + // cout << "aUnitName is NULL !!" << endl; } BRep_Builder B; TopoDS_Vertex V; -- 2.39.2