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 Feb 2, 2024
1 parent 0fef68f commit 99dc266
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 99dc266

Please sign in to comment.