diff --git a/ApplicationCode/ProjectDataModel/RimEclipseGeometrySelectionItem.cpp b/ApplicationCode/ProjectDataModel/RimEclipseGeometrySelectionItem.cpp index f4922cdcbf..10390aa13f 100644 --- a/ApplicationCode/ProjectDataModel/RimEclipseGeometrySelectionItem.cpp +++ b/ApplicationCode/ProjectDataModel/RimEclipseGeometrySelectionItem.cpp @@ -97,7 +97,7 @@ QString RimEclipseGeometrySelectionItem::geometrySelectionText() const } else { - text = "No case"; + return "No case"; } text += ", "; diff --git a/ApplicationCode/ProjectDataModel/RimGridTimeHistoryCurve.cpp b/ApplicationCode/ProjectDataModel/RimGridTimeHistoryCurve.cpp index 74147dbef8..ba28dea1c5 100644 --- a/ApplicationCode/ProjectDataModel/RimGridTimeHistoryCurve.cpp +++ b/ApplicationCode/ProjectDataModel/RimGridTimeHistoryCurve.cpp @@ -225,13 +225,16 @@ std::vector RimGridTimeHistoryCurve::yValues() const RigCaseCellResultsData* cellResultsData = m_eclipseResultDefinition->currentGridCellResults(); - std::vector timeStepDates = cellResultsData->timeStepDates(); + if ( cellResultsData ) + { + std::vector timeStepDates = cellResultsData->timeStepDates(); - values = RigTimeHistoryResultAccessor::timeHistoryValues( eclTopItem->eclipseCase()->eclipseCaseData(), - m_eclipseResultDefinition(), - gridIndex, - cellIndex, - timeStepDates.size() ); + values = RigTimeHistoryResultAccessor::timeHistoryValues( eclTopItem->eclipseCase()->eclipseCaseData(), + m_eclipseResultDefinition(), + gridIndex, + cellIndex, + timeStepDates.size() ); + } } if ( geoMechGeomSelectionItem() && geoMechGeomSelectionItem()->geoMechCase() ) @@ -464,11 +467,14 @@ std::vector RimGridTimeHistoryCurve::timeStepValues() const { RigCaseCellResultsData* cellResultsData = m_eclipseResultDefinition->currentGridCellResults(); - std::vector timeStepDates = cellResultsData->timeStepDates(); - - for ( QDateTime dt : timeStepDates ) + if ( cellResultsData ) { - dateTimes.push_back( dt.toTime_t() ); + std::vector timeStepDates = cellResultsData->timeStepDates(); + + for ( QDateTime dt : timeStepDates ) + { + dateTimes.push_back( dt.toTime_t() ); + } } } @@ -512,7 +518,10 @@ std::vector RimGridTimeHistoryCurve::daysSinceSimulationStart() const { RigCaseCellResultsData* cellResultsData = m_eclipseResultDefinition->currentGridCellResults(); - daysSinceSimulationStart = cellResultsData->daysSinceSimulationStart(); + if ( cellResultsData ) + { + daysSinceSimulationStart = cellResultsData->daysSinceSimulationStart(); + } } RimGeoMechGeometrySelectionItem* geoMechTopItem = geoMechGeomSelectionItem();