Salome HOME
Fix of 0022476: EDF 2828 GEOM [XAO] : Crash when exporting to .xao (or operation...
authorakl <akl@opencascade.com>
Wed, 12 Feb 2014 13:19:59 +0000 (17:19 +0400)
committerakl <akl@opencascade.com>
Wed, 12 Feb 2014 13:19:59 +0000 (17:19 +0400)
src/XAO/XAO_BrepGeometry.cxx

index 042f935f981bfc92ef5b343e5010b6d9c61dcd19..e9d2643472257e13e66c6f5deb1d00fd21550a4c 100644 (file)
@@ -53,10 +53,7 @@ const std::string BrepGeometry::getShapeString()
 {
     std::ostringstream streamShape;
     BRepTools::Write(m_shape, streamShape);
-    std::string data = streamShape.str();
-    char* res = new char[data.size()];
-    strcpy(res, data.c_str());
-    return res;
+    return streamShape.str();
 }
 
 void BrepGeometry::setShapeString(const std::string& shape)