mirror of
https://github.com/OPM/ResInsight.git
synced 2025-01-01 03:37:15 -06:00
Guard null pointer access
When switching between seismic cubes with different sizes, a trace can end up being null
This commit is contained in:
parent
3dcb81ebfb
commit
b7e2d2182c
@ -585,7 +585,7 @@ std::shared_ptr<ZGYAccess::SeismicSliceData>
|
||||
|
||||
auto trace = m_filereader->trace( iline, xline, zMinIndex, zSize );
|
||||
|
||||
if ( trace->size() != zSize )
|
||||
if ( trace == nullptr || trace->size() != zSize )
|
||||
{
|
||||
memset( pOut, 0, zSize * sizeof( float ) );
|
||||
}
|
||||
@ -614,7 +614,7 @@ std::shared_ptr<ZGYAccess::SeismicSliceData>
|
||||
|
||||
auto trace = m_filereader->trace( iline, xline, zMinIndex, zSize );
|
||||
|
||||
if ( trace->size() != zSize )
|
||||
if ( trace == nullptr || trace->size() != zSize )
|
||||
{
|
||||
memset( pOut, 0, zSize * sizeof( float ) );
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user