Prevent Sentry KICAD-MM crash.

It'd be nicer to know what happens, but we don't have a reproducible
case, so this "fix" will at least prevent that particular crash.
This commit is contained in:
Jeff Young 2023-06-04 23:00:44 +01:00
parent 1528f4700c
commit 0091b9f897
1 changed files with 1 additions and 1 deletions

View File

@ -844,7 +844,7 @@ void FOOTPRINT_EDIT_FRAME::OnUpdateLoadFootprintFromBoard( wxUpdateUIEvent& aEve
{ {
PCB_EDIT_FRAME* frame = (PCB_EDIT_FRAME*) Kiway().Player( FRAME_PCB_EDITOR, false ); PCB_EDIT_FRAME* frame = (PCB_EDIT_FRAME*) Kiway().Player( FRAME_PCB_EDITOR, false );
aEvent.Enable( frame && frame->GetBoard()->GetFirstFootprint() != nullptr ); aEvent.Enable( frame != nullptr );
} }