From ca7aec2d4e625087d6b56e6066253c143ec4291a Mon Sep 17 00:00:00 2001 From: bobo87 Date: Thu, 11 Apr 2019 14:24:39 -0700 Subject: [PATCH] Fix crash in gerbview when legacy disabled Fixes: lp:1822877 * https://bugs.launchpad.net/kicad/+bug/1822877 --- gerbview/events_called_functions.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gerbview/events_called_functions.cpp b/gerbview/events_called_functions.cpp index 99d51325b5..0be79b495e 100644 --- a/gerbview/events_called_functions.cpp +++ b/gerbview/events_called_functions.cpp @@ -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 ); }