From 50c9732e9aa976f329dbc69214b4b82f474cf8b4 Mon Sep 17 00:00:00 2001 From: Kathy Date: Wed, 22 Apr 2020 16:12:02 +0000 Subject: [PATCH] B2020-058: Null reference on procedure properties when procedure is an enhanced procedure (part 2) --- PROMS/Volian.Controls.Library/StepTabRibbon.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/PROMS/Volian.Controls.Library/StepTabRibbon.cs b/PROMS/Volian.Controls.Library/StepTabRibbon.cs index 46ea35f3..27c68190 100644 --- a/PROMS/Volian.Controls.Library/StepTabRibbon.cs +++ b/PROMS/Volian.Controls.Library/StepTabRibbon.cs @@ -1723,7 +1723,8 @@ namespace Volian.Controls.Library else btnCASCreate.Enabled = (MyEditItem != null) ? (MyEditItem.MyStepPanel.ApplDisplayMode > 0) : false; // B2016-237 added context menu item to change image size - btnCMImgSz.Enabled = MyEditItem.MyItemInfo.IsFigure && (MyEditItem.MyItemInfo.MyContent.MyImage != null || MyEditItem.MyItemInfo.MyContent.Text.ToUpper().Contains("#LINK")); + // B2020-058 added check for null MyEditItem + btnCMImgSz.Enabled = MyEditItem!=null && MyEditItem.MyItemInfo.IsFigure && (MyEditItem.MyItemInfo.MyContent.MyImage != null || MyEditItem.MyItemInfo.MyContent.Text.ToUpper().Contains("#LINK")); } // Made a public method so that it can be called when a step is deleted from the tree view.