diff --git a/PROMS/VEPROMS User Interface/frmVEPROMS.cs b/PROMS/VEPROMS User Interface/frmVEPROMS.cs index 05955591..e7a16a4a 100644 --- a/PROMS/VEPROMS User Interface/frmVEPROMS.cs +++ b/PROMS/VEPROMS User Interface/frmVEPROMS.cs @@ -1261,7 +1261,8 @@ namespace VEPROMS private void tv_WordSectionDeleted(object sender, WordSectionEventArgs args) { // is it a library document - if so and libdoc panel is visible, update lists on panel. - if ((!args.MySectionInfo.IsStepSection) && ((args.MySectionInfo.MyContent.MyEntry.MyDocument.LibTitle ?? "") != "") && (toolsPanel.Expanded)) + // entry is null if it's a table of contents. + if ((!args.MySectionInfo.IsStepSection) && (args.MySectionInfo.MyContent.MyEntry != null) && ((args.MySectionInfo.MyContent.MyEntry.MyDocument.LibTitle ?? "") != "") && (toolsPanel.Expanded)) { if (toolsTabs.SelectedTab == tabItemLibDocs) {