Salome HOME
projects
/
modules
/
shaper.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Issue #1942: group - names are empty strings
[modules/shaper.git]
/
src
/
GeomAlgoAPI
/
GeomAlgoAPI_XAOImport.cpp
diff --git
a/src/GeomAlgoAPI/GeomAlgoAPI_XAOImport.cpp
b/src/GeomAlgoAPI/GeomAlgoAPI_XAOImport.cpp
index b0309c2739b565b51c555a4d373d8236ae3ee271..7647f71227d11368c6f34ad96ab366005e3c30e2 100644
(file)
--- a/
src/GeomAlgoAPI/GeomAlgoAPI_XAOImport.cpp
+++ b/
src/GeomAlgoAPI/GeomAlgoAPI_XAOImport.cpp
@@
-6,8
+6,6
@@
#include <GeomAlgoAPI_XAOImport.h>
#include <GeomAlgoAPI_XAOImport.h>
-#include <cassert>
-
#include <TopoDS_Shape.hxx>
#include <XAO_XaoExporter.hxx>
#include <TopoDS_Shape.hxx>
#include <XAO_XaoExporter.hxx>
@@
-22,11
+20,14
@@
std::shared_ptr<GeomAPI_Shape> XAOImport(const std::string& theFileName,
std::string& theError,
XAO::Xao* theXao)
{
std::string& theError,
XAO::Xao* theXao)
{
- assert(theXao);
-
#ifdef _DEBUG
std::cout << "Import XAO from file " << theFileName << std::endl;
#endif
#ifdef _DEBUG
std::cout << "Import XAO from file " << theFileName << std::endl;
#endif
+ if (theFileName.empty() || !theXao) {
+ theError = "An invalid argument.";
+ return std::shared_ptr<GeomAPI_Shape>();
+ }
+
TopoDS_Shape aShape;
try {
if (XAO::XaoExporter::readFromFile(theFileName, theXao)) {
TopoDS_Shape aShape;
try {
if (XAO::XaoExporter::readFromFile(theFileName, theXao)) {