mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-26 23:20:29 -05:00
#14450 Guard against missing data source in RFT plot
RimWellRftPlot::dataSource() returned a default constructed variant when no source was selected. The variant then held a null RimSummaryCase pointer, and RicCreateRftPlotsFeature dereferenced it. Add std::monostate as first alternative to represent no data source.
This commit is contained in:
1 parent
656944c6fc
commit
3023e6e335
4 files changed
+43
-2
No files matched your search
@@ -1897,7 +1897,7 @@ void RimWellRftPlot::initializeDataSources( RimWellRftPlot* source )
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::variant<RimSummaryCase*, RimSummaryEnsemble*> RimWellRftPlot::dataSource() const
|
||||
std::variant<std::monostate, RimSummaryCase*, RimSummaryEnsemble*> RimWellRftPlot::dataSource() const
|
||||
{
|
||||
// Return the first selected ensemble, if any
|
||||
// If no ensemble is selected, return the first selected summary case, if any
|
||||
|
||||
Reference in new issue
Block a user