From 206c73abcb8dc944533e23043de2ee0258975439 Mon Sep 17 00:00:00 2001 From: John Date: Mon, 6 Jan 2014 15:36:07 +0000 Subject: [PATCH] Added a check for a Null reference (B2013-198 / B2013-192) which fixes an bug inserting a new sub-section. --- PROMS/Volian.Controls.Library/vlnTreeView.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/PROMS/Volian.Controls.Library/vlnTreeView.cs b/PROMS/Volian.Controls.Library/vlnTreeView.cs index e26e50f1..28dae2c7 100644 --- a/PROMS/Volian.Controls.Library/vlnTreeView.cs +++ b/PROMS/Volian.Controls.Library/vlnTreeView.cs @@ -1691,7 +1691,8 @@ namespace Volian.Controls.Library else if (newtype == MenuSelections.Section) // Insert subsection at end of parents section list { string message = string.Empty; - if (!MySessionInfo.CanCheckOutItem(_LastProcedureInfo.ItemID, CheckOutType.Procedure, ref message)) + if (_LastProcedureInfo != null) + if (!MySessionInfo.CanCheckOutItem(_LastProcedureInfo.ItemID, CheckOutType.Procedure, ref message)) { MessageBox.Show(this, message, "Item Already Checked Out", MessageBoxButtons.OK, MessageBoxIcon.Warning); return;