]> SALOME platform Git repositories - modules/shaper.git/blobdiff - src/XGUI/XGUI_Workshop.cpp
Salome HOME
Merge branch 'V9_5_BR'
[modules/shaper.git] / src / XGUI / XGUI_Workshop.cpp
index 3a15e274e42ea7b2d49b1c41ecf2b49a676b315e..19d750c8614fcc0fe78560323a0fc0d37829e4d9 100644 (file)
@@ -1954,7 +1954,7 @@ void XGUI_Workshop::deleteObjects()
     ResultConstructionPtr aConstr = std::dynamic_pointer_cast<ModelAPI_ResultConstruction>(aObj);
     FeaturePtr aFeature = ModelAPI_Feature::feature(aObj);
     if (aFeature) {
-      notDelete = (!aFeature->isInHistory()) && aConstr->isInfinite();
+      notDelete = (!aFeature->isInHistory()) && (aConstr && aConstr->isInfinite());
       if (notDelete) {
         anObjects.removeAll(aObj);
         aIt--;
@@ -2785,7 +2785,7 @@ void XGUI_Workshop::setNormalView(bool toInvert)
   GeomShapePtr aPlanarFace;
   foreach(ModuleBase_ViewerPrsPtr aPrs, aPrsList) {
     GeomShapePtr aShape = aPrs->shape();
-    if (aShape.get() && aShape->isPlanar()) {
+    if (aShape.get() && aShape->isFace() && aShape->isPlanar()) {
       aPlanarFace = aShape;
       break;
     }