From c121a2fce161f302655203c9665117d46694e18b Mon Sep 17 00:00:00 2001 From: John Date: Mon, 17 Dec 2012 17:04:44 +0000 Subject: [PATCH] B2012-377 Fixed null reference for transition to empty procedure set --- PROMS/Volian.Controls.Library/DisplayTransition.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/PROMS/Volian.Controls.Library/DisplayTransition.cs b/PROMS/Volian.Controls.Library/DisplayTransition.cs index 13933954..5d694626 100644 --- a/PROMS/Volian.Controls.Library/DisplayTransition.cs +++ b/PROMS/Volian.Controls.Library/DisplayTransition.cs @@ -960,7 +960,8 @@ namespace Volian.Controls.Library } else toItem = (ItemInfo)cbTranSects.SelectedItem; // didn't select a step. - linktxt = string.Format("#Link:Transition:{0} {1}", listBoxTranFmt.SelectedIndex, toItem.ItemID); + if (toItem != null) // this will be null if transition is to a an empty procedure set (sections but no steps) + linktxt = string.Format("#Link:Transition:{0} {1}", listBoxTranFmt.SelectedIndex, toItem.ItemID); } // toItem may have been set in the 'Range' selection code above. if (toItem == null && (etm & E_TransUI.SectMenuAny) == E_TransUI.SectMenuAny)