From 84557d24d6c6b48998f319ffe3e16171bd89e0ab Mon Sep 17 00:00:00 2001 From: nds Date: Wed, 2 Dec 2015 18:11:44 +0300 Subject: [PATCH] #1118 Crash the SALOME application after export --- src/ExchangePlugin/ExchangePlugin_ExportFeature.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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); -- 2.39.2