From 298377980f0ee65e248cf54e303864231d4057fd Mon Sep 17 00:00:00 2001 From: Rich Date: Tue, 17 May 2016 20:32:22 +0000 Subject: [PATCH] If the user choses to link to an existing item and then clicks on the dropdown and does not select an existing item, the code will wait for another action to be taken. Without this change the code was crashing. --- PROMS/Volian.Controls.Library/dlgEnhMissingItem.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/PROMS/Volian.Controls.Library/dlgEnhMissingItem.cs b/PROMS/Volian.Controls.Library/dlgEnhMissingItem.cs index 811bf6d9..f7be0ed8 100644 --- a/PROMS/Volian.Controls.Library/dlgEnhMissingItem.cs +++ b/PROMS/Volian.Controls.Library/dlgEnhMissingItem.cs @@ -90,6 +90,7 @@ namespace Volian.Controls.Library if (_SourceItem.IsProcedure) { ItemInfo ii = cbUnlinkedEnhancedItems.SelectedItem as ItemInfo; + if (ii == null) return; ContentInfoList cil = ContentInfoList.Get16BitEnhancedContents(_SourceItem.ItemID, ii.ItemID, _EnhType); bool foundSubItem = false; // in returned list, see if there are any sections/steps. If none, don't prompt foreach (ContentInfo ci in cil)