mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Regression Tests : Add missing null pointer guards
This commit is contained in:
parent
95e73a04df
commit
d89162fe55
@ -112,7 +112,7 @@ bool RicToggleMeasurementModeFeature::isCommandChecked()
|
||||
RimMeasurement* RicToggleMeasurementModeFeature::measurement() const
|
||||
{
|
||||
RiaGuiApplication* app = RiaGuiApplication::instance();
|
||||
CAF_ASSERT( app && app->project() );
|
||||
if ( !app->project() ) return nullptr;
|
||||
|
||||
return app->project()->measurement();
|
||||
}
|
||||
|
@ -61,7 +61,9 @@ void RicShowSummaryCurveCalculatorFeature::hideCurveCalculatorDialog()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RicShowSummaryCurveCalculatorFeature::isCommandEnabled()
|
||||
{
|
||||
RimProject* proj = RimProject::current();
|
||||
RimProject* proj = RimProject::current();
|
||||
if ( !proj ) return false;
|
||||
|
||||
const auto& allSumCases = proj->allSummaryCases();
|
||||
|
||||
return !allSumCases.empty();
|
||||
|
@ -43,7 +43,9 @@ CAF_CMD_SOURCE_INIT( RicLinkVisibleViewsFeature, "RicLinkVisibleViewsFeature" );
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RicLinkVisibleViewsFeature::isCommandEnabled()
|
||||
{
|
||||
RimProject* proj = RimProject::current();
|
||||
RimProject* proj = RimProject::current();
|
||||
if ( !proj ) return false;
|
||||
|
||||
std::vector<Rim3dView*> visibleViews;
|
||||
std::vector<RimGridView*> linkedviews;
|
||||
std::vector<RimGridView*> visibleGridViews;
|
||||
|
Loading…
Reference in New Issue
Block a user