From 54c5ec595cbc3e86de1ef777877e04617c8b9915 Mon Sep 17 00:00:00 2001 From: walker-sheng Date: Wed, 3 Feb 2021 18:24:30 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A9=BA=E6=8C=87=E9=92=88=E5=BC=82=E5=B8=B8?= =?UTF-8?q?=E5=B1=8F=E8=94=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../joylink/rtss/simulation/cbtc/ATS/AtsApiServiceImpl.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/club/joylink/rtss/simulation/cbtc/ATS/AtsApiServiceImpl.java b/src/main/java/club/joylink/rtss/simulation/cbtc/ATS/AtsApiServiceImpl.java index 6fceb61b3..af5e21d89 100644 --- a/src/main/java/club/joylink/rtss/simulation/cbtc/ATS/AtsApiServiceImpl.java +++ b/src/main/java/club/joylink/rtss/simulation/cbtc/ATS/AtsApiServiceImpl.java @@ -40,6 +40,9 @@ public class AtsApiServiceImpl implements AtsApiService { TrainInfo train = repository.findSupervisedTrainByGroup(stopMessage.getGroupNumber()); Section section = stopMessage.getSection(); Station station = section.getStation(); + if (train == null || station == null) { + return; + } if (train.isParking() && Objects.equals(train.getStationCode(), station.getCode())) { // 已经处理过 return;