Salome HOME
Warning hunting
[tools/medcoupling.git] / src / MEDLoader / MEDLoaderBase.cxx
index 86bf9c2270f36b30ca95044df908af71609ffb1b..8af45dda8de09af891ed2f546f9236a009d21f6e 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2014  CEA/DEN, EDF R&D
+// Copyright (C) 2007-2016  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
@@ -89,7 +89,7 @@ std::string MEDLoaderBase::buildUnionUnit(const char *name, int nameLgth, const
 {
   std::string ret(buildStringFromFortran(name,nameLgth));
   std::string unitCpp(buildStringFromFortran(unit,unitLgth));
-  if(unitCpp[0]=='\0')
+  if(unitCpp.empty() || unitCpp[0]=='\0')
     return ret;
   ret+=" [";
   ret+=unitCpp;