Skip to content

Commit e948431

Browse files
committed
Fix: Add null check in case a symbol could not be found in the symbol table - display original address
1 parent 4f7e58f commit e948431

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

LibNoDaveConnectionLibrary/DataTypes/Blocks/Step7V5/S7FunctionBlockRow.cs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -770,9 +770,13 @@ public string ToString(bool useSymbol, bool addSemicolonAfterCommand, bool useDa
770770
}
771771
else
772772
{
773-
par = "\"" + sym.Symbol + "\"." + paras[1];
774-
if (hasBit)
775-
par += "." + paras[2];
773+
if (sym != null)
774+
{
775+
par = "\"" + sym.Symbol + "\"." + paras[1];
776+
777+
if (hasBit)
778+
par += "." + paras[2];
779+
}
776780
}
777781
}
778782
else

0 commit comments

Comments
 (0)