]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
#1118 Crash the SALOME application after export
authornds <nds@opencascade.com>
Wed, 2 Dec 2015 15:11:44 +0000 (18:11 +0300)
committerdbv <dbv@opencascade.com>
Tue, 8 Dec 2015 08:49:56 +0000 (11:49 +0300)
src/ExchangePlugin/ExchangePlugin_ExportFeature.cpp

index f43c7c73387214a65e6ace8899bbd37d2c9b291d..a399b646ee9ac6108fad65f45bfc9896a973ec7e 100644 (file)
@@ -83,7 +83,12 @@ void ExchangePlugin_ExportFeature::execute()
       this->selectionList(ExchangePlugin_ExportFeature::SELECTION_LIST_ID());
   std::list<std::shared_ptr<GeomAPI_Shape> > 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<GeomAPI_Shape> aCurShape = anAttrSelection->value();
+    if (aCurShape.get() == NULL)
+      aCurShape = anAttrSelection->context()->shape();
+    if (aCurShape.get() != NULL)
+      aShapes.push_back(aCurShape);
   }
   std::shared_ptr<GeomAPI_Shape> aShape =
       GeomAlgoAPI_CompoundBuilder::compound(aShapes);