diff --git a/ApplicationLibCode/ProjectDataModel/RimEclipseResultCase.cpp b/ApplicationLibCode/ProjectDataModel/RimEclipseResultCase.cpp index 25390d6f3a..0efa77d8f1 100644 --- a/ApplicationLibCode/ProjectDataModel/RimEclipseResultCase.cpp +++ b/ApplicationLibCode/ProjectDataModel/RimEclipseResultCase.cpp @@ -498,6 +498,13 @@ cvf::ref 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(); }