Salome HOME
WIP
[modules/yacs.git] / src / yacsloader / switchParsers.hxx
index 808c95928e358a02f1d3ff205ad15e2a1942817c..2711e1b2d1191120362f4d2aa7716f8a54e91ffa 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2006-2014  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
@@ -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) 
         {