StimPlan Model: fix crash when model has been deleted.

This commit is contained in:
Kristian Bendiksen 2023-06-12 14:02:17 +02:00
parent 9fd9e90c61
commit 3bdb57d637

View File

@ -179,7 +179,7 @@ void RimStimPlanModelCurve::performDataExtraction( bool* isUsingPseudoLength )
QString RimStimPlanModelCurve::createCurveAutoName()
{
QString textWithLineFeed = caf::AppEnum<RiaDefines::CurveProperty>::uiText( m_curveProperty() ).trimmed();
if ( m_curveProperty == RiaDefines::CurveProperty::PRESSURE || m_curveProperty == RiaDefines::CurveProperty::STRESS )
if ( ( m_curveProperty == RiaDefines::CurveProperty::PRESSURE || m_curveProperty == RiaDefines::CurveProperty::STRESS ) && m_stimPlanModel )
{
// Append date for pressure
QString pressureDate = m_stimPlanModel->pressureDate();