Skip to content

Commit

Permalink
Disconnect comparison view in destructor of RimEclipseResultCase
Browse files Browse the repository at this point in the history
In debug build on Windows, a crash in the destructor of Rim3dView happens when the comparison view is set to null.
  • Loading branch information
magnesj committed Jan 29, 2024
1 parent aff3d80 commit 165c771
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions ApplicationLibCode/ProjectDataModel/RimEclipseResultCase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -498,6 +498,13 @@ cvf::ref<RifReaderInterface> RimEclipseResultCase::createMockModel( QString mode
//--------------------------------------------------------------------------------------------------
RimEclipseResultCase::~RimEclipseResultCase()
{
// Disconnect all comparison views. In debug build on Windows, a crash occurs. The comparison view is also set to zero in the destructor
// of Rim3dView()
for ( auto v : reservoirViews )
{
if ( v ) v->setComparisonView( nullptr );
}

reservoirViews.deleteChildren();
m_flowDiagSolutions.deleteChildren();
}
Expand Down

0 comments on commit 165c771

Please sign in to comment.