From 77a24c41ebbafac92c988a3e206294812d488a2d Mon Sep 17 00:00:00 2001 From: Michael Huth Date: Thu, 14 Sep 2023 15:30:59 +0200 Subject: [PATCH] Bugfix: Fix pending RTE from ShowTraceInfoTags Under special circumstance DoIgorMenu/OVRD returned a null string for S_value. This was reported to WM and should be fixed in Igor Pro 9 Build 56469 or later. This commit adds two checks that give a BUG message if S_value is either returned null or empty as both should never happen. since at least eceba1dd (bugfix for showing the traceinfotags, 2023-08-07) --- Packages/MIES/MIES_GuiUtilities.ipf | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Packages/MIES/MIES_GuiUtilities.ipf b/Packages/MIES/MIES_GuiUtilities.ipf index 5d4053adac..97dd33c3b8 100644 --- a/Packages/MIES/MIES_GuiUtilities.ipf +++ b/Packages/MIES/MIES_GuiUtilities.ipf @@ -2137,6 +2137,16 @@ Function ShowTraceInfoTags() // Window must not be hidden // Returns in S_value the state before toggling DoIgorMenu/OVRD "Graph", "Show Trace Info Tags" + if(IsNull(S_value)) + BUG("DoIgorMenu returned S_value as null string for \"Show Trace Info Tags\"") + KillWindow/Z $S_name + return NaN + endif + if(IsEmpty(S_value)) + BUG("DoIgorMenu returned S_value as empty string for \"Show Trace Info Tags\"") + KillWindow/Z $S_name + return NaN + endif if(CmpStr(S_value,"Show Trace Info Tags")) // toggled to "Show Trace Info Tags", need to toggle back DoIgorMenu/OVRD "Graph", "Show Trace Info Tags"