From f01873f96a4c5f1d5a22220b2ac24693306cb70e Mon Sep 17 00:00:00 2001 From: eap Date: Mon, 25 Jun 2018 16:50:57 +0300 Subject: [PATCH] [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 --- .../SALOMEDSImpl_AttributeParameter.cxx | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) 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