mirror of
https://github.com/OPM/ResInsight.git
synced 2025-01-07 14:43:10 -06:00
Regression Test: Guard null pointer access
This commit is contained in:
parent
55966ef6e8
commit
a86abab3cb
@ -810,7 +810,7 @@ void RivWellPathPartMgr::buildWellPathParts( const caf::DisplayCoordTransform* d
|
|||||||
|
|
||||||
double cellRadius = 15.0;
|
double cellRadius = 15.0;
|
||||||
auto eclipseView = dynamic_cast<RimEclipseView*>( m_rimView.p() );
|
auto eclipseView = dynamic_cast<RimEclipseView*>( m_rimView.p() );
|
||||||
if ( eclipseView )
|
if ( eclipseView && eclipseView->mainGrid() )
|
||||||
{
|
{
|
||||||
double characteristicCellSize = eclipseView->mainGrid()->characteristicIJCellSize();
|
double characteristicCellSize = eclipseView->mainGrid()->characteristicIJCellSize();
|
||||||
cellRadius = sphereRadiusFactor * characteristicCellSize;
|
cellRadius = sphereRadiusFactor * characteristicCellSize;
|
||||||
|
@ -550,11 +550,13 @@ std::set<QDateTime> RimWellPlotTools::availableSimWellTimesteps( RimEclipseCase*
|
|||||||
const QString& simWellName,
|
const QString& simWellName,
|
||||||
bool addFirstReportTimestep )
|
bool addFirstReportTimestep )
|
||||||
{
|
{
|
||||||
|
if ( !eclCase || !eclCase->eclipseCaseData() ) return {};
|
||||||
|
|
||||||
std::set<QDateTime> availebleTimeSteps;
|
std::set<QDateTime> availebleTimeSteps;
|
||||||
|
|
||||||
const RigSimWellData* simWell = eclCase->eclipseCaseData()->findSimWellData( simWellName );
|
const RigSimWellData* simWell = eclCase->eclipseCaseData()->findSimWellData( simWellName );
|
||||||
|
|
||||||
if ( eclCase && eclCase->eclipseCaseData() && simWell )
|
if ( simWell )
|
||||||
{
|
{
|
||||||
std::vector<QDateTime> allTimeSteps =
|
std::vector<QDateTime> allTimeSteps =
|
||||||
eclCase->eclipseCaseData()->results( RiaDefines::PorosityModelType::MATRIX_MODEL )->timeStepDates();
|
eclCase->eclipseCaseData()->results( RiaDefines::PorosityModelType::MATRIX_MODEL )->timeStepDates();
|
||||||
|
Loading…
Reference in New Issue
Block a user