From 6c34870789d45bfb4eacc25eec6348455a3ced1b Mon Sep 17 00:00:00 2001 From: loy Date: Thu, 23 Mar 2023 13:50:45 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-92325=20=E4=BF=AE=E5=A4=8D=E7=8E=AF?= =?UTF-8?q?=E5=A2=83=E5=88=9D=E5=A7=8B=E5=8C=96=E4=B9=8B=E5=89=8D=E8=B0=83?= =?UTF-8?q?=E7=94=A8=E8=BF=9C=E7=A8=8B=E8=AE=BE=E8=AE=A1=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E5=AF=BC=E8=87=B4NPE=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/fr/design/mainframe/vcs/common/VcsHelper.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/designer-base/src/main/java/com/fr/design/mainframe/vcs/common/VcsHelper.java b/designer-base/src/main/java/com/fr/design/mainframe/vcs/common/VcsHelper.java index 0c8924e9d0..dd7187be23 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/vcs/common/VcsHelper.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/vcs/common/VcsHelper.java @@ -68,7 +68,11 @@ public class VcsHelper implements JTemplateActionListener { } private VcsHelper() { - legacyMode = WorkContext.getCurrent().get(VcsOperator.class).isLegacyMode(); + VcsOperator op = WorkContext.getCurrent().get(VcsOperator.class); + // 开了设计器启动页面时一开始取不到VcsOperator,通过下面的切换环境事件再取,这边判断下 + if (op != null) { + legacyMode = op.isLegacyMode(); + } EventDispatcher.listen(WorkspaceEvent.AfterSwitch, new Listener() { @Override public void on(Event event, Workspace param) {