B2021-033: crash on copy/paste replace of figure
This commit is contained in:
parent
380dd2ceac
commit
1171a51d00
@ -543,12 +543,15 @@ namespace VEPROMS.CSLA.Library
|
|||||||
private static int GetMaxSubStepLevel(ItemInfo parent)
|
private static int GetMaxSubStepLevel(ItemInfo parent)
|
||||||
{
|
{
|
||||||
int maxStepLevel = parent.StepLevel-1; // subtract one to account for HLS - we want the sub-step level
|
int maxStepLevel = parent.StepLevel-1; // subtract one to account for HLS - we want the sub-step level
|
||||||
foreach (ItemInfo kid in parent.Steps)
|
if (parent.Steps != null) // B2021-033: check for null
|
||||||
{
|
{
|
||||||
if (kid.Steps != null)
|
foreach (ItemInfo kid in parent.Steps)
|
||||||
maxStepLevel = Math.Max(maxStepLevel, GetMaxSubStepLevel(kid));
|
{
|
||||||
else
|
if (kid.Steps != null)
|
||||||
maxStepLevel = Math.Max(maxStepLevel,kid.StepLevel-1); // subtract one to account for HLS because we are counting only sub-step levels
|
maxStepLevel = Math.Max(maxStepLevel, GetMaxSubStepLevel(kid));
|
||||||
|
else
|
||||||
|
maxStepLevel = Math.Max(maxStepLevel, kid.StepLevel - 1); // subtract one to account for HLS because we are counting only sub-step levels
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return maxStepLevel;
|
return maxStepLevel;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user