From 7f71ee64349edebd7903dd8505d2252ceddc92a4 Mon Sep 17 00:00:00 2001 From: davidpanderson Date: Tue, 16 Feb 2021 12:22:40 -0800 Subject: [PATCH] Manager: don't crash when alt-space is pressed --- clientgui/AdvancedFrame.cpp | 1 + clientgui/sg_BoincSimpleFrame.cpp | 1 + 2 files changed, 2 insertions(+) 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);