From: nds Date: Wed, 2 Dec 2015 15:11:44 +0000 (+0300) Subject: #1118 Crash the SALOME application after export X-Git-Tag: V_2.1.0~219 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=84557d24d6c6b48998f319ffe3e16171bd89e0ab;p=modules%2Fshaper.git #1118 Crash the SALOME application after export --- diff --git a/src/ExchangePlugin/ExchangePlugin_ExportFeature.cpp b/src/ExchangePlugin/ExchangePlugin_ExportFeature.cpp index f43c7c733..a399b646e 100644 --- a/src/ExchangePlugin/ExchangePlugin_ExportFeature.cpp +++ b/src/ExchangePlugin/ExchangePlugin_ExportFeature.cpp @@ -83,7 +83,12 @@ void ExchangePlugin_ExportFeature::execute() this->selectionList(ExchangePlugin_ExportFeature::SELECTION_LIST_ID()); std::list > aShapes; for (int i = 0, aSize = aSelectionListAttr->size(); i < aSize; ++i) { - aShapes.push_back(aSelectionListAttr->value(i)->value()); + AttributeSelectionPtr anAttrSelection = aSelectionListAttr->value(i); + std::shared_ptr aCurShape = anAttrSelection->value(); + if (aCurShape.get() == NULL) + aCurShape = anAttrSelection->context()->shape(); + if (aCurShape.get() != NULL) + aShapes.push_back(aCurShape); } std::shared_ptr aShape = GeomAlgoAPI_CompoundBuilder::compound(aShapes);