Fixed logic to keep code from crashing.

This commit is contained in:
Rich 2014-11-06 02:48:50 +00:00
parent e77c7dfc2c
commit 32ddfbbce0
2 changed files with 2 additions and 2 deletions

View File

@ -1641,7 +1641,7 @@ namespace Volian.Controls.Library
foreach (ItemInfo myItem in myList)
{
sb.Append(string.Format("\r\n\"{0}\"\t\"{1}\"\t\"{2}\"\t\"{3}\"", myItem.ShortPath, myItem.ToolTip,
myItem.DisplayText, !myItem.IsSection && !myItem.IsHigh ? myItem.MyHLS.DisplayText : ""));
myItem.DisplayText, !myItem.IsSection && !myItem.IsHigh ? (myItem.MyHLS == null ? "" : myItem.MyHLS.DisplayText) : ""));
if (myItem.ItemAnnotationCount > 0)
foreach (AnnotationInfo myAnnotation in myItem.ItemAnnotations)
sb.Append(string.Format("\t\"{0}\"", myAnnotation.SearchText));

View File

@ -2707,7 +2707,7 @@ namespace Volian.Print.Library
&& !MyItemInfo.MyDocStyle.CancelSectTitle
&& !MyItemInfo.MyDocStyle.SpecialStepsFoldout)
// In Checklist: I don't have children or if I have children the first child doesn't alignwithparent.
|| (!itemInfo.IsStepSection && itemInfo.MyHLS.FormatStepData.UseSmartTemplate
|| (!itemInfo.IsStepSection && itemInfo.MyHLS != null && itemInfo.MyHLS.FormatStepData.UseSmartTemplate
&& ((itemInfo.Steps == null || itemInfo.Steps.Count == 0)
|| !itemInfo.Steps[0].FormatStepData.StepLayoutData.AlignWithParentTab)))
{