diff --git a/repository/repository_manager.go b/repository/repository_manager.go index c24366d..5c96d4b 100644 --- a/repository/repository_manager.go +++ b/repository/repository_manager.go @@ -681,7 +681,6 @@ func findEndTurnoutPortOrEndKm(repo *Repository, link *Link, startTp *TurnoutPor break } } - link.bindDevices(devices...) return endTp, endKm, err } diff --git a/repository/turnout.go b/repository/turnout.go index 08ad7e7..083730a 100644 --- a/repository/turnout.go +++ b/repository/turnout.go @@ -313,5 +313,8 @@ func (t *TurnoutPort) Device() PortedDevice { } func (t *TurnoutPort) Turnout() *Turnout { + if t == nil { + return nil + } return t.turnout }