pcbnew: Allow Missing legacy option

LEGACY is disabled for GTK3, so we may not find the menu item

Fixes: lp:1822877
* https://bugs.launchpad.net/kicad/+bug/1822877
This commit is contained in:
Seth Hillbrand 2019-04-03 15:54:08 -07:00
parent 0fb956cdbe
commit ce254d1061
1 changed files with 1 additions and 1 deletions

View File

@ -1195,7 +1195,7 @@ void PCB_BASE_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 );
}
}