#5582 Fix crash in GeoMech contour map

This commit is contained in:
Gaute Lindkvist 2020-03-02 12:25:37 +01:00
parent bd1d1caacc
commit 86fa10fd13

View File

@ -278,8 +278,10 @@ void RivGeoMechVizLogic::calculateCurrentTotalCellVisibility( cvf::UByteArray* t
std::vector<RivGeoMechPartMgrCache::Key> visiblePartMgrs = keysToVisiblePartMgrs( timeStepIndex ); std::vector<RivGeoMechPartMgrCache::Key> visiblePartMgrs = keysToVisiblePartMgrs( timeStepIndex );
for ( size_t pmIdx = 0; pmIdx < visiblePartMgrs.size(); ++pmIdx ) for ( size_t pmIdx = 0; pmIdx < visiblePartMgrs.size(); ++pmIdx )
{ {
RivGeoMechPartMgr* partMgr = m_partMgrCache->partMgr( visiblePartMgrs[pmIdx] ); RivGeoMechPartMgr* partMgr = getUpdatedPartMgr( visiblePartMgrs[pmIdx] );
CVF_ASSERT( partMgr );
if ( partMgr )
{
cvf::ref<cvf::UByteArray> visibility = partMgr->cellVisibility( 0 ); cvf::ref<cvf::UByteArray> visibility = partMgr->cellVisibility( 0 );
for ( int elmIdx = 0; elmIdx < elmCount; ++elmIdx ) for ( int elmIdx = 0; elmIdx < elmCount; ++elmIdx )
{ {
@ -287,3 +289,4 @@ void RivGeoMechVizLogic::calculateCurrentTotalCellVisibility( cvf::UByteArray* t
} }
} }
} }
}