Guard null pointer access

This commit is contained in:
Magne Sjaastad 2024-09-27 07:16:10 +02:00
parent 67adab8ad3
commit 360a635cda

View File

@ -2363,6 +2363,8 @@ void RimEclipseView::calculateCurrentTotalCellVisibility( cvf::UByteArray* total
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RimEclipseView::calculateCellVisibility( cvf::UByteArray* visibility, std::vector<RivCellSetEnum> geomTypes, int timeStep ) void RimEclipseView::calculateCellVisibility( cvf::UByteArray* visibility, std::vector<RivCellSetEnum> geomTypes, int timeStep )
{ {
if ( !mainGrid() ) return;
size_t cellCount = mainGrid()->globalCellArray().size(); size_t cellCount = mainGrid()->globalCellArray().size();
visibility->resize( cellCount ); visibility->resize( cellCount );