Fix crash in gerbview when legacy disabled

Fixes: lp:1822877
* https://bugs.launchpad.net/kicad/+bug/1822877
This commit is contained in:
bobo87 2019-04-11 14:24:39 -07:00 committed by Seth Hillbrand
parent 4020b5689b
commit ca7aec2d4e
1 changed files with 1 additions and 1 deletions

View File

@ -565,7 +565,7 @@ void GERBVIEW_FRAME::OnUpdateSwitchCanvas( wxUpdateUIEvent& aEvent )
for( auto ii: menuList )
{
wxMenuItem* item = menuBar->FindItem( ii.menuId );
if( ii.galType == canvasType )
if( item && ii.galType == canvasType )
{
item->Check( true );
}