From 462315f282670734dac57651861e44e8d38c3ed0 Mon Sep 17 00:00:00 2001 From: John Date: Wed, 13 May 2020 19:43:00 +0000 Subject: [PATCH] B2020-070 Added null reference checks. --- PROMS/Volian.Controls.Library/DisplaySearch.cs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/PROMS/Volian.Controls.Library/DisplaySearch.cs b/PROMS/Volian.Controls.Library/DisplaySearch.cs index c309e023..cbe092c6 100644 --- a/PROMS/Volian.Controls.Library/DisplaySearch.cs +++ b/PROMS/Volian.Controls.Library/DisplaySearch.cs @@ -164,7 +164,8 @@ namespace Volian.Controls.Library void tabSearchTypes_SelectedTabChanged(object sender, TabStripTabChangedEventArgs e) { - wordSectionTreeNode.Enabled = true; + if(wordSectionTreeNode != null) //B2020-070 NULL reference check + wordSectionTreeNode.Enabled = true; btnSearch.Enabled = true; if (e.NewTab == tabROSearch) { @@ -172,8 +173,11 @@ namespace Volian.Controls.Library } else if (e.NewTab == tabTranSearch) { - wordSectionTreeNode.Enabled = false; // C2020-010: Disable Word Section choice for Transition search - wordSectionTreeNode.Checked = false; + if (wordSectionTreeNode != null) //B2020-070 NULL reference check + { + wordSectionTreeNode.Enabled = false; // C2020-010: Disable Word Section choice for Transition search + wordSectionTreeNode.Checked = false; + } btnSearch.Enabled = (cbxTranCategory.Items.Count > 0); // B2017-038 disable search button if no format selected //enable-disable doc version nodes based on version type if selected if (cbxTranVersion.SelectedIndex > -1)