Salome HOME
WIP
[modules/yacs.git] / src / yacsloader / switchParsers.hxx
index 79657322c5b3b7e8cec4ecbd7670ec537f2556e9..2711e1b2d1191120362f4d2aa7716f8a54e91ffa 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2006-2013  CEA/DEN, EDF R&D
+// Copyright (C) 2006-2019  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
 // License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -112,6 +112,8 @@ namespace YACS
 
   void casetypeParser::buildAttr(const XML_Char** attr)
     {
+      if (!attr)
+        return;
       this->required("id",attr);
       for (int i = 0; attr[i]; i += 2) 
         {
@@ -237,6 +239,8 @@ namespace YACS
 
   void defaultcasetypeParser::buildAttr(const XML_Char** attr)
     {
+      if (!attr)
+        return;
       for (int i = 0; attr[i]; i += 2) 
       {
         DEBTRACE( attr[i] << "=" << attr[i + 1] )             
@@ -256,6 +260,8 @@ namespace YACS
 
   void switchtypeParser::buildAttr(const XML_Char** attr)
     {
+      if (!attr)
+        return;
       this->required("name",attr);
       for (int i = 0; attr[i]; i += 2) 
         {