]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Fix crash on export to CAD format a feature but not its result
authorazv <azv@opencascade.com>
Wed, 8 Dec 2021 11:30:06 +0000 (14:30 +0300)
committerazv <azv@opencascade.com>
Wed, 8 Dec 2021 11:30:06 +0000 (14:30 +0300)
src/ExchangePlugin/ExchangePlugin_ExportFeature.cpp

index 1da829a6f1e2ea5f6a5524b55268cf7c357ff7d8..32d52205c1f99273a1cf7635d836c9a7c5d75fe5 100644 (file)
@@ -211,7 +211,7 @@ void ExchangePlugin_ExportFeature::exportFile(const std::string& theFileName,
     /// do not export pictures
     ResultPtr aBodyContext =
       std::dynamic_pointer_cast<ModelAPI_Result>(anAttrSelection->context());
-    if (aBodyContext->hasTexture())
+    if (aBodyContext.get() && aBodyContext->hasTexture())
       continue;
 
     std::shared_ptr<GeomAPI_Shape> aCurShape = anAttrSelection->value();