Salome HOME
bos #26594 Failed KERNEL test: fix typemap for swig 4x
[modules/yacs.git] / src / yacsloader / containerParsers.cxx
index fab182bac7cf74ed73782a683b6e71f2ab7f6d2c..e285e2f76a2226017b12d23ca07b07baea099af8 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2006-2014  CEA/DEN, EDF R&D
+// Copyright (C) 2006-2021  CEA/DEN, EDF R&D
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
@@ -32,6 +32,8 @@ namespace YACS
 
   void machinetypeParser::buildAttr(const XML_Char** attr)
     {
+      if (!attr)
+        return;
       required("name",attr);
       for (int i = 0; attr[i]; i += 2)
       {
@@ -47,6 +49,8 @@ namespace YACS
 
   void containertypeParser::buildAttr(const XML_Char** attr)
     {
+      if (!attr)
+        return;
       required("name",attr);
       for (int i = 0; attr[i]; i += 2)
       {
@@ -101,6 +105,8 @@ namespace YACS
 
   void loadtypeParser::buildAttr(const XML_Char** attr)
     {
+      if (!attr)
+        return;
       required("container",attr);
       for (int i = 0; attr[i]; i += 2)
       {