From: gdd Date: Thu, 9 Aug 2012 14:30:34 +0000 (+0000) Subject: Check if aUnitName is NULL before testing unit value. X-Git-Tag: V6_6_0a1~49 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=3b485f4d87f9d629deb5be151dbc32c5055f6ab3;p=modules%2Fgeom.git Check if aUnitName is NULL before testing unit value. --- 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;