Salome HOME
refs #569: fix remarks.
[modules/hydro.git] / src / HYDROGUI / HYDROGUI_SplitPolylinesOp.cxx
index afb40918ae12b7abb5dd77a85f50c5cd1a569e74..73f415a8957783ee7e0e6d81bb8eef3f32855fb4 100644 (file)
@@ -152,14 +152,17 @@ void HYDROGUI_SplitPolylinesOp::OnUpdatePreview()
       {
         gp_Pnt2d aPnt = aPanel->GetPoint();
         TopoDS_Vertex aVertex = BRepLib_MakeVertex( gp_Pnt( aPnt.X(), aPnt.Y(), 0.0 ) );
-        aBB.Add( aCmp, aPanel->GetMainPolyline()->GetShape() );
+        if( !aPanel->GetMainPolyline().IsNull() )
+          aBB.Add( aCmp, aPanel->GetMainPolyline()->GetShape() );
         aBB.Add( aCmp, aVertex );
         break;
       }
     case HYDROGUI_SplitPolylinesDlg::ByTool:
       {
-        aBB.Add( aCmp, aPanel->GetMainPolyline()->GetShape() );
-        aBB.Add( aCmp, aPanel->GetToolPolyline()->GetShape() );
+        if( !aPanel->GetMainPolyline().IsNull() )
+          aBB.Add( aCmp, aPanel->GetMainPolyline()->GetShape() );
+        if( !aPanel->GetToolPolyline().IsNull() )
+          aBB.Add( aCmp, aPanel->GetToolPolyline()->GetShape() );
         break;
       }
     case HYDROGUI_SplitPolylinesDlg::Split: