【增加地图数据异常判断】

This commit is contained in:
weizhihong 2022-05-07 09:50:08 +08:00
parent b213ddc9ac
commit a168017970

View File

@ -282,7 +282,11 @@ public class StationDirectionService {
validMethod.valid(simulation, stationDirection);
}
// 修改状态
stationDirection.modifyButtonStatus(type, pressDown);
if (stationDirection != null) {
stationDirection.modifyButtonStatus(type, pressDown);
} else {
throw new SimulationException(SimulationExceptionType.Simulation_Map_Data_Error, "数据异常:地图数据异常");
}
// 后续动作
if (buttonDoMethod != null) {
buttonDoMethod.doThen(simulation, stationDirection);