From 6e59c2e286c7a90a1bdbe51ad627de396b9abf43 Mon Sep 17 00:00:00 2001 From: James Crook Date: Fri, 6 Apr 2018 14:27:33 +0100 Subject: [PATCH] Move Nyquist Workbench to Tools menu Also disable and comment an incorrect ASSERT. --- lib-src/mod-nyq-bench/NyqBench.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib-src/mod-nyq-bench/NyqBench.cpp b/lib-src/mod-nyq-bench/NyqBench.cpp index f5e3a1fb3..8f69decd2 100755 --- a/lib-src/mod-nyq-bench/NyqBench.cpp +++ b/lib-src/mod-nyq-bench/NyqBench.cpp @@ -169,7 +169,9 @@ extern "C" int ModuleDispatch(ModuleDispatchTypes type){ switch (type){ case AppQuiting: { - wxASSERT(gBench != NULL); + //It is perfectly OK for gBench to be NULL. + //Can happen if the menu item was never invoked. + //wxASSERT(gBench != NULL); if (gBench) { gBench->Destroy(); gBench = NULL; @@ -185,7 +187,7 @@ extern "C" wxMenuBar * pBar = p->GetMenuBar(); wxASSERT(pBar != NULL ); - wxMenu * pMenu = pBar->GetMenu( 2 ); // Menu 2 is the View Menu. + wxMenu * pMenu = pBar->GetMenu( 9 ); // Menu 9 is the Tools Menu. wxASSERT( pMenu != NULL ); c->SetCurrentMenu(pMenu);