mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#5161 Don't attempt to export empty LAS-curves. It will crash in LAS-exporter.
This commit is contained in:
parent
2e8518b7c9
commit
4bbb12e32a
@ -58,17 +58,20 @@ public:
|
|||||||
{
|
{
|
||||||
CVF_ASSERT( lasFile );
|
CVF_ASSERT( lasFile );
|
||||||
|
|
||||||
std::vector<double> wellLogValues = m_curveData->xValues();
|
if ( !m_curveData->xValues().empty() )
|
||||||
for ( size_t vIdx = 0; vIdx < wellLogValues.size(); vIdx++ )
|
|
||||||
{
|
{
|
||||||
double value = wellLogValues[vIdx];
|
std::vector<double> wellLogValues = m_curveData->xValues();
|
||||||
if ( value == HUGE_VAL || value == -HUGE_VAL || value != value )
|
for ( size_t vIdx = 0; vIdx < wellLogValues.size(); vIdx++ )
|
||||||
{
|
{
|
||||||
wellLogValues[vIdx] = absentValue;
|
double value = wellLogValues[vIdx];
|
||||||
|
if ( value == HUGE_VAL || value == -HUGE_VAL || value != value )
|
||||||
|
{
|
||||||
|
wellLogValues[vIdx] = absentValue;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
lasFile->AddLog( m_channelName, m_unit, m_comment, wellLogValues );
|
lasFile->AddLog( m_channelName, m_unit, m_comment, wellLogValues );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string channelName() const
|
std::string channelName() const
|
||||||
|
Loading…
Reference in New Issue
Block a user