#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:
Magne Sjaastad committed 2026-09-15 08:15:59 -04:00
1 parent c1bce5299a
commit f73afc5b76
1 file changed
+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() );