B2018-116 added a null reference check in logic that allow you to unlink a background step

This commit is contained in:
John Jenko 2018-08-23 16:41:49 +00:00
parent fefa774b12
commit 813d48daaa

View File

@ -313,7 +313,7 @@ namespace Volian.Controls.Library
{
DevComponents.DotNetBar.BaseItem btn = sender as DevComponents.DotNetBar.BaseItem;
ItemInfo ii = ItemInfo.Get(int.Parse(btn.Tag.ToString()));
if (ii.ItemID != MyItemInfo.ItemID)
if (ii == null || ii.ItemID != MyItemInfo.ItemID) //B2018-116 null reference check - allow user to unlink a background step that has invalid ItemId
{
// if button name starts with btnEnhancedTo... open it, otherwise, unlink:
if (btn.Name.StartsWith("btnEnhancedTo"))