B2020-039: Fix crash on save of Word selection (invalid selectedindex used)
This commit is contained in:
parent
8c4f36566c
commit
8b389f9727
@ -122,8 +122,9 @@ namespace VEPROMS
|
|||||||
CheckOffHeaderList chkoffHeaderList = pf.FormatData.ProcData.CheckOffData.CheckOffHeaderList;
|
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;
|
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
|
// 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)
|
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];
|
_SectionConfig.Section_CheckoffListSelection = _CheckOffIndex[ppCmbxCheckoffType.SelectedIndex];
|
||||||
if (ppCmbxCheckoffHeading.Enabled && chkoffHeaderList != null && chkoffHeaderList.MaxIndexNoInherit > 1)
|
if (ppCmbxCheckoffHeading.Enabled && chkoffHeaderList != null && chkoffHeaderList.MaxIndexNoInherit > 1)
|
||||||
_SectionConfig.Section_CheckoffHeaderSelection = ppCmbxCheckoffHeading.SelectedIndex;
|
_SectionConfig.Section_CheckoffHeaderSelection = ppCmbxCheckoffHeading.SelectedIndex;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user