mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Janitor : Guard access to undefined memory
This commit is contained in:
@@ -72,6 +72,8 @@ void RimGridCrossPlotCurve::setSamples( const std::vector<double>& xValues, cons
|
||||
{
|
||||
CVF_ASSERT( xValues.size() == yValues.size() );
|
||||
|
||||
if ( xValues.empty() || yValues.empty() ) return;
|
||||
|
||||
m_qwtPlotCurve->setSamples( &xValues[0], &yValues[0], static_cast<int>( xValues.size() ) );
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user