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.

This commit is contained in:
Rich 2016-05-17 20:32:22 +00:00
parent 3b4d15b7dd
commit 298377980f

View File

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