mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-25 06:38:13 -05:00
#14741 Fix null-pointer dereference in RicPlaceThermalFractureUsingTemplateDataFeature
selectedThermalFracture() dereferenced the result of selectedItemOfType<RimWellPathFracture>() without a null check, surfaced by the command-feature enablement sweep when no fracture is selected.
This commit is contained in:
1 parent
c1bce5299a
commit
f73afc5b76
1 file changed
+1
+1
@@ -81,6 +81,7 @@ bool RicPlaceThermalFractureUsingTemplateDataFeature::isCommandEnabled() const
|
||||
RimWellPathFracture* RicPlaceThermalFractureUsingTemplateDataFeature::selectedThermalFracture()
|
||||
{
|
||||
auto fracture = caf::SelectionManager::instance()->selectedItemOfType<RimWellPathFracture>();
|
||||
if ( !fracture ) return nullptr;
|
||||
if ( !fracture->fractureTemplate() ) return nullptr;
|
||||
|
||||
RimThermalFractureTemplate* thermalTemplate = dynamic_cast<RimThermalFractureTemplate*>( fracture->fractureTemplate() );
|
||||
|
||||
Reference in new issue
Block a user