X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FGeomAlgoAPI%2FGeomAlgoAPI_XAOImport.cpp;h=7647f71227d11368c6f34ad96ab366005e3c30e2;hb=64981a525f8bc2c450475822e96dcc2766454ad3;hp=b0309c2739b565b51c555a4d373d8236ae3ee271;hpb=3dfd59d003ec108b5c4ffe5b47c2a6e3ffdfc0c3;p=modules%2Fshaper.git diff --git a/src/GeomAlgoAPI/GeomAlgoAPI_XAOImport.cpp b/src/GeomAlgoAPI/GeomAlgoAPI_XAOImport.cpp index b0309c273..7647f7122 100644 --- a/src/GeomAlgoAPI/GeomAlgoAPI_XAOImport.cpp +++ b/src/GeomAlgoAPI/GeomAlgoAPI_XAOImport.cpp @@ -6,8 +6,6 @@ #include -#include - #include #include @@ -22,11 +20,14 @@ std::shared_ptr XAOImport(const std::string& theFileName, std::string& theError, XAO::Xao* theXao) { - assert(theXao); - #ifdef _DEBUG std::cout << "Import XAO from file " << theFileName << std::endl; #endif + if (theFileName.empty() || !theXao) { + theError = "An invalid argument."; + return std::shared_ptr(); + } + TopoDS_Shape aShape; try { if (XAO::XaoExporter::readFromFile(theFileName, theXao)) {