B2021-074 Added a null reference check for FormatStepData.

This commit is contained in:
John Jenko 2021-07-28 19:30:35 +00:00
parent 08fed71e13
commit 2e1123a556

View File

@ -220,7 +220,8 @@ namespace VEPROMS.CSLA.Library
} }
_MyStaticItemInfo = _MyItemInfo; _MyStaticItemInfo = _MyItemInfo;
// F2019-069: Add format variable to allow format to specify Default Text for a step. Implemented for Barakah's 'Hold Point' // F2019-069: Add format variable to allow format to specify Default Text for a step. Implemented for Barakah's 'Hold Point'
if (_MyItemInfo.MyContent.Text == "" && _MyItemInfo.FormatStepData.DefaultText != null && _MyItemInfo.FormatStepData.DefaultText != "") // B2021-074 Needed a null reference check for FormatStepData
if (_MyItemInfo.MyContent.Text == "" && _MyItemInfo.FormatStepData != null && _MyItemInfo.FormatStepData.DefaultText != null && _MyItemInfo.FormatStepData.DefaultText != "")
{ {
text= _MyItemInfo.FormatStepData.DefaultText; text= _MyItemInfo.FormatStepData.DefaultText;
AddedDefaultTextFromFmt = true; AddedDefaultTextFromFmt = true;