mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#9464 contour plot crash on legend levels change
The geometry was not properly cleared when on legend changed, and would lead to crash when number of legend levels decreased. Janitor: Fix two crashes when loading repro case
This commit is contained in:
committed by
GitHub
parent
5847547d81
commit
4345cb3a70
@@ -380,8 +380,10 @@ void RivSurfacePartMgr::generateNativePartGeometry()
|
||||
m_usedSurfaceData = m_surfaceInView->surface()->surfaceData();
|
||||
if ( m_usedSurfaceData.isNull() ) return;
|
||||
|
||||
const std::vector<cvf::Vec3d>& vertices = m_usedSurfaceData->vertices();
|
||||
cvf::ref<cvf::Vec3fArray> cvfVertices = new cvf::Vec3fArray( vertices.size() );
|
||||
const std::vector<cvf::Vec3d>& vertices = m_usedSurfaceData->vertices();
|
||||
if ( vertices.empty() ) return;
|
||||
|
||||
cvf::ref<cvf::Vec3fArray> cvfVertices = new cvf::Vec3fArray( vertices.size() );
|
||||
for ( size_t i = 0; i < vertices.size(); ++i )
|
||||
{
|
||||
( *cvfVertices )[i] = cvf::Vec3f( vertices[i] - displayModOffsett );
|
||||
|
Reference in New Issue
Block a user