B2020-050 Added a NULL reference check on nextItem before attempting to call ResetOrdinal() in DeleteItemAndChildren.

This commit is contained in:
John Jenko 2020-04-06 14:09:50 +00:00
parent 8c708ae5fd
commit 0b6ca223db

View File

@ -2334,7 +2334,7 @@ namespace VEPROMS.CSLA.Library
ItemInfo.DeleteItemInfoAndChildren(item.ItemID); // Dispose ItemInfo and Children
if (prevItem != null)
prevItem.UpdateTransitionText();
else
else if (nextItem != null) // B2020-050 needed check for null nextItem - found when deleting empty equation sub-step
nextItem.ResetOrdinal(); // B2020-043: Fix transition text, code moved from above, so that DeleteItemInfoAndChildren is called first.
}