Don't check for a control that doesn't exist
Fixes https://gitlab.com/kicad/code/kicad/-/issues/5759
This commit is contained in:
parent
9efc91c107
commit
5d78e9512f
|
@ -190,6 +190,7 @@ protected:
|
|||
* @param aParent is a wxFrame passed to wxFileDialog.
|
||||
* @param aFileName on entry is a probable choice, on return is the
|
||||
* chosen full filename (includes path).
|
||||
* @param aCreateProject will be filled with the state of the Create Project? checkbox if relevant
|
||||
*
|
||||
* @return bool - true if chosen, else false if user aborted.
|
||||
*/
|
||||
|
@ -221,7 +222,9 @@ bool AskSaveBoardFileName( PCB_EDIT_FRAME* aParent, wxString* aFileName, bool* a
|
|||
fn.SetExt( KiCadPcbFileExtension );
|
||||
|
||||
*aFileName = fn.GetFullPath();
|
||||
*aCreateProject = static_cast<CREATE_PROJECT_CHECKBOX*>( dlg.GetExtraControl() )->GetValue();
|
||||
|
||||
if( wxWindow* extraControl = dlg.GetExtraControl() )
|
||||
*aCreateProject = static_cast<CREATE_PROJECT_CHECKBOX*>( extraControl )->GetValue();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue