B2022-109: Delete procedure from tree view crashes if after copy/paste

This commit is contained in:
Kathy Ruffing 2022-09-01 14:15:51 +00:00
parent 4c81ed1ca1
commit 59a5f20310

View File

@ -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 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; 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; return rtval;