Added a fix not to check for font if the paragraph is not a step.

This commit is contained in:
Rich 2012-05-29 10:54:03 +00:00
parent 604c39a5c0
commit 58cb0f1c77

View File

@ -121,7 +121,7 @@ namespace Volian.Print.Library
vlnParagraph myParagraph = this as vlnParagraph; vlnParagraph myParagraph = this as vlnParagraph;
if (myParagraph != null) if (myParagraph != null)
{ {
if (myParagraph.MyItemInfo.FormatStepData.Font.Family == "Prestige Elite Tall") if (myParagraph.MyItemInfo.FormatStepData != null && myParagraph.MyItemInfo.FormatStepData.Font.Family == "Prestige Elite Tall")
{ {
Chunk chk = RemoveLastCharacter(iParagraph); Chunk chk = RemoveLastCharacter(iParagraph);
float heightAllButOne = GetHeight(cb, iParagraph, width, throwException); float heightAllButOne = GetHeight(cb, iParagraph, width, throwException);