B2021-093 null reference check when looking for child RO values
This commit is contained in:
parent
d6c42e144b
commit
f69fd75759
@ -304,13 +304,15 @@ namespace VEPROMS.CSLA.Library
|
|||||||
public string GetParentChildROValue(rochild roc)
|
public string GetParentChildROValue(rochild roc)
|
||||||
{
|
{
|
||||||
string roval = roc.value;
|
string roval = roc.value;
|
||||||
|
// B2021-093 Don't look for child RO values if "roval" is null
|
||||||
|
if (roval == null) return null;
|
||||||
// get the child (slave) information and set the rtnchld.value to the corresponding RO Value
|
// get the child (slave) information and set the rtnchld.value to the corresponding RO Value
|
||||||
int selChldIdx = MyDocVersionInfo.DocVersionConfig.SelectedSlave;
|
int selChldIdx = MyDocVersionInfo.DocVersionConfig.SelectedSlave;
|
||||||
string childName = MyDocVersionInfo.DocVersionConfig.Unit_Name;
|
string childName = MyDocVersionInfo.DocVersionConfig.Unit_Name;
|
||||||
string aplString = roval;
|
string aplString = roval;
|
||||||
string ChldValue = "";
|
string ChldValue = "";
|
||||||
// if the RO Value contains Parent/Child values, parse out default value and the child (slave or unit specific) value
|
// if the RO Value contains Parent/Child values, parse out default value and the child (slave or unit specific) value
|
||||||
while (roval.Contains("<APL DefaultVal="))
|
while (roval != null && roval.Contains("<APL DefaultVal="))
|
||||||
{
|
{
|
||||||
int startCVIdx = roval.IndexOf("<APL DefaultVal=");
|
int startCVIdx = roval.IndexOf("<APL DefaultVal=");
|
||||||
int EndCVidx = roval.IndexOf(" /APL>", startCVIdx);
|
int EndCVidx = roval.IndexOf(" /APL>", startCVIdx);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user