diff --git a/PROMS/VEPROMS User Interface/frmVEPROMS.cs b/PROMS/VEPROMS User Interface/frmVEPROMS.cs index f07d378f..d5fe126f 100644 --- a/PROMS/VEPROMS User Interface/frmVEPROMS.cs +++ b/PROMS/VEPROMS User Interface/frmVEPROMS.cs @@ -1431,7 +1431,8 @@ namespace VEPROMS if (tc.SelectedDisplayTabItem != null && tc.SelectedDisplayTabItem.MyStepTabPanel != null) // MyStepTabPanel will be null if the active tab is a Word Attachment { StepPanel pnl = tc.SelectedDisplayTabItem.MyStepTabPanel.MyStepPanel; - if (pnl != null) pnl.MyStepTabPanel.MyStepTabRibbon.SetPasteButtons(false); + // B2022-109: crash when deleting a copy of pasted procedure - check for nulls + if (pnl != null && pnl.MyStepTabPanel != null && pnl.MyStepTabPanel.MyStepTabRibbon != null) pnl.MyStepTabPanel.MyStepTabRibbon.SetPasteButtons(false); } return rtval;