From: eap Date: Mon, 25 Jun 2018 13:50:57 +0000 (+0300) Subject: [BuildingIS 2018] 1757: Exception on calling Object Browser context popup menu after... X-Git-Tag: SHAPER_V9_1_0RC1~13 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=f01873f96a4c5f1d5a22220b2ac24693306cb70e;p=modules%2Fkernel.git [BuildingIS 2018] 1757: Exception on calling Object Browser context popup menu after open a study from *.hdf persistence of AttributeParameter fixed for a case of empty string --- diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeParameter.cxx b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeParameter.cxx index 31b608d39..b4eec6e62 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeParameter.cxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeParameter.cxx @@ -37,11 +37,12 @@ std::string convertString(const std::string& S) { int length = S.size(); - const char *s = S.c_str(); - char *c = new char[3], *buffer = new char[length*3+1]; + if ( length == 0 ) + return "0"; + char c[3], *buffer = new char[length*3+1]; buffer[length*3] = (char)0; for(int i = 0, pos = 0; i