From 3e72f5c4fbe0fca29652671d887c299ec2028918 Mon Sep 17 00:00:00 2001 From: "Destiny.Lin" Date: Mon, 24 Jul 2023 15:04:46 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-101293=20=E3=80=90=E7=89=88=E6=9C=AC?= =?UTF-8?q?=E7=AE=A1=E7=90=86=E4=BA=8C=E6=9C=9F=E3=80=91=E6=A8=A1=E6=9D=BF?= =?UTF-8?q?=E6=9C=AA=E6=89=93=E5=BC=80=EF=BC=8C=E7=82=B9=E5=87=BB=E7=89=88?= =?UTF-8?q?=E6=9C=AC=E7=AE=A1=E7=90=86=E7=82=B9=E4=B8=8D=E5=BC=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/mainframe/DesignerFrameFileDealerPane.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/mainframe/DesignerFrameFileDealerPane.java b/designer-base/src/main/java/com/fr/design/mainframe/DesignerFrameFileDealerPane.java index 4fb218be60..747cf6aef5 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/DesignerFrameFileDealerPane.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/DesignerFrameFileDealerPane.java @@ -394,8 +394,11 @@ public class DesignerFrameFileDealerPane extends JPanel implements FileToolbarSt private boolean isCurrentEditing(String path) { JTemplate jt = HistoryTemplateListCache.getInstance().getCurrentEditingTemplate(); - String editing = jt.getEditingFILE().getPath(); - return ComparatorUtils.equals(editing, path); + if (JTemplate.isValid(jt)) { + String editing = jt.getEditingFILE().getPath(); + return ComparatorUtils.equals(editing, path); + } + return false; } /** @@ -594,9 +597,9 @@ public class DesignerFrameFileDealerPane extends JPanel implements FileToolbarSt confirmCloseAndShowVcsNewPane(jTemplate, path); return; } - showVcsNewPane(path); } } + showVcsNewPane(path); } private void confirmCloseAndShowVcsNewPane(JTemplate specifiedTemplate, String path) {