Browse Source

REPORT-92325 修复环境初始化之前调用远程设计接口导致NPE问题

newui
loy 2 years ago
parent
commit
6c34870789
  1. 6
      designer-base/src/main/java/com/fr/design/mainframe/vcs/common/VcsHelper.java

6
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<Workspace>() {
@Override
public void on(Event event, Workspace param) {

Loading…
Cancel
Save