diff --git a/designer-base/src/main/java/com/fr/design/actions/file/PreferenceAction.java b/designer-base/src/main/java/com/fr/design/actions/file/PreferenceAction.java index a41f6cb56d..dd48e26841 100644 --- a/designer-base/src/main/java/com/fr/design/actions/file/PreferenceAction.java +++ b/designer-base/src/main/java/com/fr/design/actions/file/PreferenceAction.java @@ -40,7 +40,8 @@ public class PreferenceAction extends UpdateAction { DesignerEnvManager.loadLogSetting(); DesignerEnvManager.getEnvManager().saveXMLFile(); JTemplate jt = HistoryTemplateListCache.getInstance().getCurrentEditingTemplate(); - if (jt != null) { + //不能只单纯判断!=null,JTemplate还有可能是JNullTemplate.NULL,这个时候模板也是空内容的 + if (JTemplate.isValid(jt)) { jt.refreshToolArea(); } preferencePane.showRestartDialog();