mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-25 06:38:13 -05:00
#14699 Guard against null-pointer derefs during view/dock teardown
This commit is contained in:
1 parent
18e8b5545d
commit
6b4620715c
2 files changed
+26
-21
No files matched your search
@@ -104,7 +104,9 @@ void RimNameConfig::fieldChangedByUi( const caf::PdmFieldHandle* changedField, c
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RimNameConfig::autoName() const
|
||||
{
|
||||
RimNameConfigHolderInterface* plotHolder = firstAncestorOrThisOfTypeAsserted<RimNameConfigHolderInterface>();
|
||||
RimNameConfigHolderInterface* plotHolder = firstAncestorOrThisOfType<RimNameConfigHolderInterface>();
|
||||
if ( !plotHolder ) return {};
|
||||
|
||||
return plotHolder->createAutoName();
|
||||
}
|
||||
|
||||
@@ -132,10 +134,12 @@ void RimNameConfig::updateAllSettings()
|
||||
m_autoName.uiCapability()->updateConnectedEditors();
|
||||
m_customName.uiCapability()->updateConnectedEditors();
|
||||
|
||||
RimNameConfigHolderInterface* holder = firstAncestorOrThisOfTypeAsserted<RimNameConfigHolderInterface>();
|
||||
RimNameConfigHolderInterface* holder = firstAncestorOrThisOfType<RimNameConfigHolderInterface>();
|
||||
if ( !holder ) return;
|
||||
|
||||
holder->updateAutoName();
|
||||
caf::PdmObject* pdmObject = dynamic_cast<caf::PdmObject*>( holder );
|
||||
if ( pdmObject )
|
||||
|
||||
if ( caf::PdmObject* pdmObject = dynamic_cast<caf::PdmObject*>( holder ) )
|
||||
{
|
||||
pdmObject->updateConnectedEditors();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user