diff --git a/PROMS/VEPROMS User Interface/frmSectionProperties.cs b/PROMS/VEPROMS User Interface/frmSectionProperties.cs index 7e550cda..18d658b5 100644 --- a/PROMS/VEPROMS User Interface/frmSectionProperties.cs +++ b/PROMS/VEPROMS User Interface/frmSectionProperties.cs @@ -122,8 +122,9 @@ namespace VEPROMS CheckOffHeaderList chkoffHeaderList = pf.FormatData.ProcData.CheckOffData.CheckOffHeaderList; int maxindx = pf.FormatData.ProcData.CheckOffUCF ? pf.FormatData.ProcData.CheckOffData.CheckOffList.MaxIndex : pf.FormatData.ProcData.CheckOffData.CheckOffList.MaxIndexNoInherit; // C2020-003 use the _CheckOffIndex dictionary to get and save the index of the selected checkoff from the sorted checkoff list + // B2020-039: Added the check for a valid selected index so that crash doesn't occur if (ppGpbxSignoffCheckoff.Enabled && (chkoffList != null && maxindx > 1) - && (_CheckOffIndex[ppCmbxCheckoffType.SelectedIndex] != _SectionConfig.Section_CheckoffListSelection)) + && (ppCmbxCheckoffType.SelectedIndex > -1 && _CheckOffIndex[ppCmbxCheckoffType.SelectedIndex] != _SectionConfig.Section_CheckoffListSelection)) _SectionConfig.Section_CheckoffListSelection = _CheckOffIndex[ppCmbxCheckoffType.SelectedIndex]; if (ppCmbxCheckoffHeading.Enabled && chkoffHeaderList != null && chkoffHeaderList.MaxIndexNoInherit > 1) _SectionConfig.Section_CheckoffHeaderSelection = ppCmbxCheckoffHeading.SelectedIndex;