From 8cd0f61fb0aa36fe69bc55ada1ffb4397626b365 Mon Sep 17 00:00:00 2001 From: joylink_zhangsai <1021828630@qq.com> Date: Thu, 18 Jan 2024 10:08:53 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=BA=94=E7=AD=94=E5=99=A8?= =?UTF-8?q?=E7=A7=BB=E4=BD=8D=E6=93=8D=E4=BD=9C=E7=9A=84=E6=8A=A5=E9=94=99?= =?UTF-8?q?=E6=8F=90=E7=A4=BA=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- repository/repository_manager.go | 1 - repository/turnout.go | 3 +++ 2 files changed, 3 insertions(+), 1 deletion(-) 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 }