@@ -675,7 +675,7 @@ begin
begin
sCodeID2 := ConvertDigitCode(Node.Code, 3, '-');
sB_CodeID2 := ConvertDigitCode(Node.B_Code, 4, '-');
- if sCodeID < sCodeID2 then
+ if (sCodeID <> '') and (sCodeID < sCodeID2) then
Result := Node;
Break;