B2020-070 Added null reference checks.
This commit is contained in:
		@@ -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)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user