diff --git a/PROMS/VEPROMS.CSLA.Library/Extension/ItemInsertExt.cs b/PROMS/VEPROMS.CSLA.Library/Extension/ItemInsertExt.cs index 74d8d7a1..ca2f25ed 100644 --- a/PROMS/VEPROMS.CSLA.Library/Extension/ItemInsertExt.cs +++ b/PROMS/VEPROMS.CSLA.Library/Extension/ItemInsertExt.cs @@ -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. }