Salome HOME
patch for install error on Linux
[modules/hydro.git] / src / HYDROGUI / HYDROGUI_ShapeBathymetry.cxx
index 0575b94616ac63c8dddbc34f0afc00aa8a3d9680..e8e7941b670df5490036037941cc70b95161a62b 100644 (file)
@@ -48,7 +48,7 @@ void HYDROGUI_ShapeBathymetry::update( bool theIsUpdateViewer, bool isDeactivate
 
   Handle(HYDROData_Bathymetry) aBath = Handle(HYDROData_Bathymetry)::DownCast( getObject() );
 
-  if ( !aBath.IsNull() )
+  if ( !aBath.IsNull() && !aBath->GetAltitudePoints().empty())
   {
     buildShape();
     updateShape( false, false );
@@ -104,6 +104,8 @@ void HYDROGUI_ShapeBathymetry::GetRange( double& theMin, double& theMax ) const
 
 void HYDROGUI_ShapeBathymetry::UpdateWithColorScale( const Handle(Aspect_ColorScale)& theColorScale )
 {
+  if (!myCoords)
+    return;
   for( int i=myCoords->Lower(), n=myCoords->Upper(); i<=n; i++ )
   {
     double z = myCoords->Value( i ).Z();