Nullptr safety. (Sentry KICAD-71)

This commit is contained in:
Jeff Young 2023-01-18 00:52:19 +00:00
parent f45d44a639
commit 47d88c5647
1 changed files with 10 additions and 9 deletions

View File

@ -227,17 +227,18 @@ void DIALOG_FIELD_PROPERTIES::OnTextValueSelectButtonClick( wxCommandEvent& aEve
else
fpid = m_TextCtrl->GetValue();
KIWAY_PLAYER* frame = Kiway().Player( FRAME_FOOTPRINT_VIEWER_MODAL, true );
if( frame->ShowModal( &fpid, this ) )
if( KIWAY_PLAYER* frame = Kiway().Player( FRAME_FOOTPRINT_VIEWER_MODAL, true ) )
{
if( m_StyledTextCtrl->IsShown() )
m_StyledTextCtrl->SetValue( fpid );
else
m_TextCtrl->SetValue( fpid );
}
if( frame->ShowModal( &fpid, this ) )
{
if( m_StyledTextCtrl->IsShown() )
m_StyledTextCtrl->SetValue( fpid );
else
m_TextCtrl->SetValue( fpid );
}
frame->Destroy();
frame->Destroy();
}
}