Added a check for a Null reference (B2013-198 / B2013-192) which fixes an bug inserting a new sub-section.

This commit is contained in:
John Jenko 2014-01-06 15:36:07 +00:00
parent 0085a023de
commit 206c73abcb

View File

@ -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;