diff --git a/clientgui/AdvancedFrame.cpp b/clientgui/AdvancedFrame.cpp index 77354f1a75..5fd385675d 100644 --- a/clientgui/AdvancedFrame.cpp +++ b/clientgui/AdvancedFrame.cpp @@ -1092,6 +1092,7 @@ void CAdvancedFrame::OnMenuOpening( wxMenuEvent &event) { bool isConnected = pDoc->IsConnected(); wxMenu* menu = event.GetMenu(); + if (!menu) return; menu->FindItem(ID_SELECTCOMPUTER, &menuFile); menu->FindItem(ID_HELPBOINC, &menuHelp); diff --git a/clientgui/sg_BoincSimpleFrame.cpp b/clientgui/sg_BoincSimpleFrame.cpp index 7b16655168..7653afc2d0 100644 --- a/clientgui/sg_BoincSimpleFrame.cpp +++ b/clientgui/sg_BoincSimpleFrame.cpp @@ -472,6 +472,7 @@ void CSimpleFrame::OnMenuOpening( wxMenuEvent &event) { bool isConnected = pDoc->IsConnected(); wxMenu* menu = event.GetMenu(); + if (!menu) return; menu->FindItem(ID_CLOSEWINDOW, &menuFile); menu->FindItem(ID_HELPBOINC, &menuHelp);