From d92bc1810816e2cbe25ae6885d66f94026801c09 Mon Sep 17 00:00:00 2001 From: zack Date: Fri, 21 Oct 2016 15:53:16 +0800 Subject: [PATCH] =?UTF-8?q?=E6=97=A0JIRA=E4=BB=BB=E5=8A=A1=20NPE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/mainframe/CoverReportPane.java | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/designer_form/src/com/fr/design/mainframe/CoverReportPane.java b/designer_form/src/com/fr/design/mainframe/CoverReportPane.java index 42dc62040c..63ec66f5a5 100644 --- a/designer_form/src/com/fr/design/mainframe/CoverReportPane.java +++ b/designer_form/src/com/fr/design/mainframe/CoverReportPane.java @@ -62,15 +62,17 @@ public class CoverReportPane extends JPanel { editButton.setBackground(new Color(176, 196, 222)); add(editButton); add(controlButton); - WidgetPropertyPane.getInstance().getEditingFormDesigner().addDesignerEditListener(new DesignerEditListener() { - @Override - public void fireCreatorModified(DesignerEvent evt) { - if (evt.getCreatorEventID() == (DesignerEvent.CREATOR_DELETED) - || evt.getCreatorEventID() == (DesignerEvent.CREATOR_RESIZED)) { - destroyHelpDialog(); + if (WidgetPropertyPane.getInstance().getEditingFormDesigner() != null) { + WidgetPropertyPane.getInstance().getEditingFormDesigner().addDesignerEditListener(new DesignerEditListener() { + @Override + public void fireCreatorModified(DesignerEvent evt) { + if (evt.getCreatorEventID() == (DesignerEvent.CREATOR_DELETED) + || evt.getCreatorEventID() == (DesignerEvent.CREATOR_RESIZED)) { + destroyHelpDialog(); + } } - } - }); + }); + } } public String getHelpMsg() {