Validate iteminfo parts have counts > 0 prior to accessing elements
This commit is contained in:
parent
53123154fc
commit
7f1cfd3b88
@ -15,14 +15,14 @@ namespace VEPROMS.CSLA.Library
|
|||||||
}
|
}
|
||||||
private ItemInfo SearchNextSkip(SkipPartType skip)
|
private ItemInfo SearchNextSkip(SkipPartType skip)
|
||||||
{
|
{
|
||||||
if (skip < SkipPartType.Caution && Cautions != null) return Cautions[0].SearchTop;
|
if (skip < SkipPartType.Caution && Cautions != null && Cautions.Count > 0) return Cautions[0].SearchTop;
|
||||||
if (skip < SkipPartType.Note && Notes != null) return Notes[0].SearchTop;
|
if (skip < SkipPartType.Note && Notes != null && Notes.Count > 0) return Notes[0].SearchTop;
|
||||||
if (skip < SkipPartType.This) return this;
|
if (skip < SkipPartType.This) return this;
|
||||||
if (skip < SkipPartType.RNO && RNOs != null) return RNOs[0].SearchTop;
|
if (skip < SkipPartType.RNO && RNOs != null && RNOs.Count > 0) return RNOs[0].SearchTop;
|
||||||
if (skip < SkipPartType.Table && Tables != null) return Tables[0].SearchTop;
|
if (skip < SkipPartType.Table && Tables != null && Tables.Count > 0) return Tables[0].SearchTop;
|
||||||
if (skip < SkipPartType.Procedures && Procedures != null) return Procedures[0].SearchTop;
|
if (skip < SkipPartType.Procedures && Procedures != null && Procedures.Count > 0) return Procedures[0].SearchTop;
|
||||||
if (skip < SkipPartType.Sections && Sections != null) return Sections[0].SearchTop;
|
if (skip < SkipPartType.Sections && Sections != null && Sections.Count > 0) return Sections[0].SearchTop;
|
||||||
if (skip < SkipPartType.Steps && Steps != null) return Steps[0].SearchTop;
|
if (skip < SkipPartType.Steps && Steps != null && Steps.Count > 0) return Steps[0].SearchTop;
|
||||||
if (NextItem != null) return NextItem.SearchTop;
|
if (NextItem != null) return NextItem.SearchTop;
|
||||||
return UpOneNext;
|
return UpOneNext;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user