Fixed null reference
This commit is contained in:
parent
27703fe2c7
commit
2618a37dba
@ -3247,6 +3247,7 @@ namespace VEPROMS.CSLA.Library
|
|||||||
}
|
}
|
||||||
public int GetSmartTemplateTopLevelIndxOfThisType(int oftype)
|
public int GetSmartTemplateTopLevelIndxOfThisType(int oftype)
|
||||||
{
|
{
|
||||||
|
if (FormatStepData == null) return -1;
|
||||||
FormatData formatData = FormatStepData.MyFormat.PlantFormat.FormatData;
|
FormatData formatData = FormatStepData.MyFormat.PlantFormat.FormatData;
|
||||||
if (formatData.TopTemplateTypes == null || formatData.TopTemplateTypes.Count == 0) return -1;
|
if (formatData.TopTemplateTypes == null || formatData.TopTemplateTypes.Count == 0) return -1;
|
||||||
if (formatData.TopTemplateTypes.ContainsKey(oftype - 20001)) return formatData.TopTemplateTypes[oftype - 20001];
|
if (formatData.TopTemplateTypes.ContainsKey(oftype - 20001)) return formatData.TopTemplateTypes[oftype - 20001];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user