mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Guard null pointer use
This commit is contained in:
@@ -57,10 +57,12 @@ CAF_PDM_UI_FIELD_EDITOR_SOURCE_INIT( PdmUiPushButtonEditor );
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void PdmUiPushButtonEditor::configureAndUpdateUi( const QString& uiConfigName )
|
void PdmUiPushButtonEditor::configureAndUpdateUi( const QString& uiConfigName )
|
||||||
{
|
{
|
||||||
CAF_ASSERT( !m_pushButton.isNull() );
|
if ( !m_pushButton ) return;
|
||||||
CAF_ASSERT( !m_label.isNull() );
|
|
||||||
|
|
||||||
PdmUiFieldEditorHandle::updateLabelFromField( m_label, uiConfigName );
|
if ( m_label )
|
||||||
|
{
|
||||||
|
PdmUiFieldEditorHandle::updateLabelFromField( m_label, uiConfigName );
|
||||||
|
}
|
||||||
|
|
||||||
m_pushButton->setCheckable( true );
|
m_pushButton->setCheckable( true );
|
||||||
m_pushButton->setEnabled( !uiField()->isUiReadOnly( uiConfigName ) );
|
m_pushButton->setEnabled( !uiField()->isUiReadOnly( uiConfigName ) );
|
||||||
|
|||||||
Reference in New Issue
Block a user